Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have a problem with a measure in DAX that brings me the Max date of my Date table, a simple one MAX(DimTime[Date]), the measure works fine, but from my Fact table I have 2 relationships to the DimTime, one is active and the other one is inactive, in my Fact table the column with the active relationship is complete i doesn´t have nulls, but the one inactive has nulls values. For knowledge, I know the max date with the active relationship is '01-15-2018' but if i use the other relationship the max date is '01-14-2018', unfortunately this measure CALCULATE(MAX(DimTime[Date]),USERELANTIONSHIP(DimTime[Date],FactTable[Date2]), for reasons that I don't understand this measure show '01-15-2018' when i should be '01-14-2018'.
Any tips why is this happening?
Thanks in advanced.
Solved! Go to Solution.
All of your measures are showing the max date in the calendar table. This has nothing to do with the fact table. If you want the max date in the fact table, then refer to the column in the fact table.
Hi,
Does this work?
=CALCULATE(MAX(FactTable[Date2]),USERELANTIONSHIP(FactTable[Date2],DimTime[Date]))
hi, @Anonymous
You can use this formula as below:
New Unactive = CALCULATE(MAX(FactTable[Date2]),USERELATIONSHIP(DimTime[Date],FactTable[Date2]))
Result:
Best Regards,
Lin
All of your measures are showing the max date in the calendar table. This has nothing to do with the fact table. If you want the max date in the fact table, then refer to the column in the fact table.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |