Forum Discussion
carlol
Resolver I
4 years agoDAX Grouping Sets?
Can you have a grouping set in Dax
I want to create a Total by National and by Hospital , I can easily do in SQL and import to power BI , I want to replicate in Dax within the Dimensional Model
SQL
Select
[SurgeryDate],
ISNULL([HospitalID],9999)As[Hospital], --9999 represents National
[ProcedureID],
Sum([NumOfProcedures])As Denominator -- All Surgeries
From CTE
Group By
Grouping Sets
(
(--National
[SurgeryDate],
[ProcedureID]
),
(--Hospital
[HospitalID],
[SurgeryDate],
[ProcedureID]
)
)
Order By [HospitalID]
Result
- Anonymous4 years ago
AFAIK, there is no concept of "grouping sets" in DAX. In DAX you just slice and dice by the right dimensions.
1 Reply
- AnonymousNot applicable
AFAIK, there is no concept of "grouping sets" in DAX. In DAX you just slice and dice by the right dimensions.