The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
Hi Experts,
I have pivot showing date, WW and all the values and a DAX to calculate the difference between todays value to previous day value.
All working, except for the first day of week (Monday) it doesnt count the Sunday on the previous week when I drag WW column. For sure it is okay if i dont show ww column.
Dax to get prev day value using :
PrevDay NonContinuos = CALCULATE( SUM(
Fact_tbl1_INOUT[QTY]),FILTER(ALL(Fact_tbl1_INOUT), Fact_tbl1_INOUT[REPORT_DATE] = MAXX(
FILTER(ALL(Fact_tbl1_INOUT),Fact_tbl1_INOUT[REPORT_DATE] < MAX( Fact_tbl1_INOUT[REPORT_DATE])) , Fact_tbl1_INOUT[REPORT_DATE])))
Something appears to be missing. Maybe change your WEEKNUM third parameter to start weeks on a different day? Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Hello @Greg_Deckler ,
In the WW column, I used '2' parameter to start week with Monday. Doesnt matter which day it start the week, when the week is changing, it doesnt put into account the previous day because the previous day is in previous week. So the values did not minus yesterday value.
The only way to resolve this for now is to remove WW column from the matrix so it can calculate normally without considering WW as category. But I need to show it. Cosmetic.
WW column as :
User | Count |
---|---|
39 | |
36 | |
30 | |
29 | |
21 |
User | Count |
---|---|
64 | |
40 | |
32 | |
18 | |
16 |