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.
I have a table where the data keeps on incrementing continously, I am able to get max of each day. But what I want to achieve here is total of each day i.e difference of max values between each days. Here is a sample of both raw data and max of cycles per day, please help
Solved! Go to Solution.
Try this formula instead:
DateMaxDiff = VAR __PREV_DAY = CALCULATE ( [DateMaxValue_], DATEADD ( 'Table'[Date], -1, DAY ) ) RETURN IF ( NOT ( ISBLANK ( [DateMaxValue_] ) ), [DateMaxValue_] - __PREV_DAY )
Proud to be a Super User!
Hi @Nakul93,
Try this:
Extract the date part of tts column by creating a calculate column
Date = INT ( 'Table'[tts] )
Note: This column will be formatted as decimal by default. Change the format to date.
Create a new measure to get the max value per date.
DateMaxValue = CALCULATE ( MAX ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
Create another measure to get the difference between two dates
DateMaxDiff = VAR __PREV_DAY = CALCULATE ( [DateMaxValue_], DATEADD ( 'Table'[Date], -1, DAY ) ) RETURN [DateMaxValue_] - __PREV_DAY
Proud to be a Super User!
Hi @danextian,
Your solution worked somewhat but it is now showing data for the future date as well. Just look at the report attached
Try this formula instead:
DateMaxDiff = VAR __PREV_DAY = CALCULATE ( [DateMaxValue_], DATEADD ( 'Table'[Date], -1, DAY ) ) RETURN IF ( NOT ( ISBLANK ( [DateMaxValue_] ) ), [DateMaxValue_] - __PREV_DAY )
Proud to be a Super User!
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |