Skip to main content
2 votes

Counting rows in a table based on subtable result

select count(customer) from ( select customer from table group by customer having sum(value)<>0 ) X
LoztInSpace's user avatar
1 vote
Accepted

How do I write a Dax statement that returns the current counts whenever I filter for a TEam

I added a variable that stores the current year & month and then compare to the yearmonth column to pull the current year & month count for each Team CurrentCountPerTeam = VAR ...
Sam Johnson's user avatar
1 vote
Accepted

DAX Calculate the sum of values for a year with start date and end date

Please call the table you listed in your example FactWorkload. Create a new table called DimDate with one row per day at least spanning the date ranges mentioned in FactWorkload if not more. Add a ...
GregGalloway's user avatar
  • 1,385
1 vote

How to reference column of DAX variable?

In DAX you can't use a variable name as with tables that are defined in the model. What you can do is to use the original table names using the table variable as a filter. For instance like in the ...
sergiom's user avatar
  • 159
1 vote
Accepted

Group by in DAX like in SQL

SUMMARIZECOLUMNS is the main function to use here. So this: select SUM(Kiekis ) from Info left outer join Prekes on Info.PrekeID = Prekes.PrekeID left outer join PrekiuGrupes on Prekes....
David Browne - Microsoft's user avatar
1 vote
Accepted

Link DAX OpenQuery Output to SQL Server Temp Table

If a column name has brackets, you need to escape them. You can see how if you use function QUOTENAME(). SELECT QUOTENAME('[awful column name]') -- Result: [[awful column name]]] Note the extra ...
EzLo's user avatar
  • 3,306
1 vote
Accepted

Multi condition DAX row filter

Not an answer to your exact question, but instead of translating the SQL to DAX and maintaining it in two places, you can reuse the SQL logic in your RLS implementation to materialize tables in your ...
David Browne - Microsoft's user avatar
1 vote

MDX measure to DAX conversion

MDX & DAX are query languages for OLAP cubes. MDX is used on multidimensional OLAP cubes and is used by many vendors. DAX is Microsofts own query language and can only be used in a tabular OLAP ...
Sir Swears-a-lot's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible