Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello all,
I thought my usecase is simple to replicate in a dax measure but apparently it's not.
I've a data model with a simple table and a connected date table. Now I want to use the summarize/summarizecolumns function to calculate something on a month to month basis, This measure (MyMeasure) works fine when I build up a table visual like this (Columns A,B.C are from the main table, "Jahr" and "Monat" are from my date table):
The second measure ("MyMeasure") looks like this:
COUNTX (
SUMMARIZECOLUMNS (
MainTable[a],
MainTable[b],
MainTable[c],
DateTable[DateField].[Jahr],
DateTable[DateField].[Monat]
),
[MyMeasure]
)
But for some reason it doesn't return the same value?
I also tried the summarize funktion with exaclty the same result:
MyMeasure2 =
COUNTROWS (
(
FILTER (
ADDCOLUMNS (
SUMMARIZE (
NATURALINNERJOIN ( MainTable, DateTable ),
MainTable[a],
MainTable[b],
MainTable[c],
DateTable[DateField].[Jahr],
DateTable[DateField].[Monat]
),
"Test", CALCULATE ( [MyMeasure])
),
[Test] = 1
)
)
)
It still doesn't create the same result. Anything I'm overlooking here? I tried so many different ways but either ended up with nothing or the result from the screenshot...
Thanks!
Hi @LeoST
Here is a simpler version of your code. However, you shouldn't use the [Date].[Year] or / [Date].[Month] rather it is a good idea to have real columns in the date table and use them in both the visual and the dax. The Auto Date Hierarchy is not reliable.
MyMeasure2 =
SUMX (
SUMMARIZE (
MainTable,
MainTable[a],
MainTable[b],
MainTable[c],
DateTable[Jahr],
DateTable[Monat]
),
[MyMeasure]
)
I think I found the reason for the difference but I don't know why it's not working correctly: It matches if I remove the page filter I set. It appears the MyMeasure2 does not considner the pagefilter at all? Why is that the case?
User | Count |
---|---|
53 | |
35 | |
20 | |
15 | |
14 |
User | Count |
---|---|
94 | |
76 | |
36 | |
22 | |
18 |