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.
Hi,
I am working on a visual in Power BI in which I would like to copy the previous week's quantity to the next week if it does not exists and keep the same values if it exists.
As an example in the 1st row there is no quantity against the dates 2/26/2018 and 2/27/2018...so it should be previous week's value(0 0 11359) i.e. it should retain the Total order type(which is a calculated field)
Total = Demand + Supply
Need to create a DAX measure for this functionality.
So could you please tell me a way of achieving it in Power BI?
Please find the link of my PBI file attached below:
https://drive.google.com/open?id=1cCnbdHqfSGa4q_ktrzcPiYv1dM8GrAZj
Hi @sajal161292,
After test, I can not find a way. While there is no quantity against the dates 2/26/2018 and 2/27/2018, it should display the previous week value(0 0 11359), the previous week of 2/26/2018 means from 2/19/2018 to 2/26/2018?
Best Regards,
Angelia
Hi,
My bad...It should be previous date's data (Total field at the bottom is the sum of Demand and Supply).
It should be like:
Demand 0
Supply 0
Total 11359 (in this example).
In case of missing quantitites the Demand and Supply must be zero.
Total should remain same as that of previous date.
Hi,
I am trying to use this dax measure:
Condition Check =
VAR lastday =
CALCULATE (
MAX ( 'Shortages'[Due Date] ),
FILTER (
ALL ( 'calendar'[Date] ),
'calendar'[Date] < MAX ( 'calendar'[Date] )
))
var ordr = SELECTEDVALUE(Shortages[Order type])
return if(ISBLANK(min(Shortages[Due Date])),
SWITCH(ordr,"Total",CALCULATE(SUM(Shortages[quantity]),FILTER(all('calendar'),'calendar'[Date]=lastday)),
" "),SUM(Shortages[quantity]))
But it is not giving me the desired output.
Can someone please help?
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 |
---|---|
117 | |
104 | |
77 | |
73 | |
50 |
User | Count |
---|---|
145 | |
109 | |
108 | |
90 | |
64 |