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.
My data set :
Date | Category | Count |
01-05-2020 | ABC | 313 |
01-05-2020 | DEF | 1000 |
02-05-2020 | ABC | 33 |
02-05-2020 | DEF | 33 |
03-05-2020 | ABC | 38 |
03-05-2020 | DEF | 21 |
My expected outcome is to get the rate values as shown below for respective dates:
Category | 01-05-2020 | 02-05-2020 | 03-05-2020 | 01-05-2020(new) | 02-05-2020(new) | 03-05-2020(new) |
ABC | 313 | 33 | 38 | N/A | -89% | 15% |
DEF | 1000 | 166 | 21 | N/A | -83% | -87% |
How to write the following formula in DAX : (33 * 100 / 313) - 100 = -89% or ([COUNT OF TODAY'S DATE] * 100 / [COUNT OF YESTERDAY'S DATE]) - 100
Solved! Go to Solution.
Hi @Anonymous ,
You need to create measure in powerbi design pane instead of in power query pane. You could refer to my sample for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , You can get the last date like this using date table
Last Day Non Continous = CALCULATE(sum('order'[Qty]),filter(all(Table),Table[Date] =MAXX(FILTER(all(Table),Table[Date]<max(Table[Date])),Table[Date])))
Day behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd(Table[Date],-1,Day))
This Day =SUM(Sales[Sales Amount])
Then take a diff % like divide(([This Day]-[Day behind Sales]),[Day behind Sales])
Hi @Anonymous ,
You need to create measure in powerbi design pane instead of in power query pane. You could refer to my sample for details.
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |