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
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 ...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
dax × 16powerbi × 8
sql-server × 6
ssas × 4
tabular-model × 4
mdx × 2
sql-server-2014 × 1
sql-server-2016 × 1
query × 1
olap × 1
ssas-2016 × 1