March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Everyone,
I have three calculated columns, and the last one is a calculated column to compare the date diff of the first two.
The result looks very normal in model tab, for example
Item ID Date Start Date Finish Date Diff
S1077098 22/05/2017 23/05/2017 1
However when I create a table in the dashboard, it shows like this
Case ID Date Start Date Finish Date Diff
S1077098 22/05/2017 23/05/2017 3
I guess this has something to do with row level, becuase I have three status for this case. How should I fix this?
The DAX that I used to calcute the date diff is
Solved! Go to Solution.
It would be on that field dropdown. It may not be first/last. I was looking at another model with text. But could be min/max, which would be the same in this case.
Not a big fan of this approach, as I prefer measures, but seeing if we can get you what you want without starting over with where your data calculations are.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingJust throwing this out there. It may be that you have 3 records for that case ID, and DateDiff of 1 3 times is 3. If that is what is happening, you could tell it to not summarize that data in the data setting for that field. Or set to FIRST or LAST as it should be the same.
Or create a measure that does the calculation at the aggregate level of your table vs calculated columns. Without seeing your table, it would be something along the lines of:
Date Difference = DATEDIFF ( MAX ( DataTable[Date Start] ), MAX ( DataTable[Date Finish] ), DAY )
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @edhans
Can you explain more about the first option? How to get it not summarize that data in the data setting for that field. And how to set to FIRST or LAST? Thanks
It would be on that field dropdown. It may not be first/last. I was looking at another model with text. But could be min/max, which would be the same in this case.
Not a big fan of this approach, as I prefer measures, but seeing if we can get you what you want without starting over with where your data calculations are.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |