Forum Discussion
Previous working day Total
- Anonymous4 years ago
Hi Anonymous ,
I updated your sample pbix file(see attachment), please check whether that is what you want.
Previous Work Day Qty = VAR _curdate = SELECTEDVALUE ( 'Purch Fact'[Purch Date] ) VAR _preworkdate = CALCULATE ( MAX ( 'Calendar'[Date] ), FILTER ( ALL ( 'Calendar' ), 'Calendar'[Date] < _curdate && WEEKDAY ( 'Calendar'[Date], 2 ) <= 5 ) ) RETURN IF ( DAY ( _curdate ) = 1, [Total Qty], SUMX ( FILTER ( ALLSELECTED ( 'Purch Fact' ), 'Purch Fact'[Purch Date] = _preworkdate ), [Total Qty] ) ) + 0Best Regards
Thanks Jihwan_Kim
I can see it working in that model.
Trying to understand how this is working. When i try to bring this into my model, my total is showing up as 0, eventhough there is value. WIll you be able to explain that expression in the return parameter please.
Also, is that HASONEVALUE being false returning that 0 for my expression. Bit confused with it.
Hi,
Thank you for your message.
Sorry to say that it is quite difficult to fully understand your question without seeing the model and visualization.
I think you already shared the link of your model, but if it is different now, could you please let me know again the link or your model?
- Anonymous4 years agoNot applicable
Thanks Jihwan_Kim . Let me see if i can take a sample of that model for you.
Just curious what is the significance of that HASONEVALUE in the measure. Looks to me that it is causing the issue in my measure. Trying to see if i can avoid and use it.