The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello all
I have this table and a date filter from calendar table.
The date filter is from 5 oct till 11 oct . I want that my measure shows the unit stocks for that last day 11/10 which would be 106 for each SKU column.
Thank you all very much
Solved! Go to Solution.
Hey @pedroccamaraDBI.
Give this a try:
Measure =
VAR MaxDate =
CALCULATE ( MAX ( 'Date'[Date] ), ALLSELECTED ( 'Date'[Date] ) )
VAR Result =
CALCULATE ( MAX ( Sales[Qty Day] ), 'Date'[Date] = MaxDate )
RETURN
Result
@pedroccamaraDBI ,Try measure liek
calculate(lastnonblankvalue('Date'[Date], sum(Table[Unit stock]) )
Hello @amitchandak
Many thanks for your answer.
Let me explain you what is my data:
For each day, i have the product code (SKU) the movement id (ID Mov) and the Qty mov, which is how many products were moved and the Qty day which is the balance. I need to know, according with date filter (from dates) the Qty Day of the MAX date on the filter. Which means in this case, it should be 106. Notice that if i may choose 2 or 3 product codes (SKU).
My measure should show 106 in this case because it's the value from the last date chosen.
I'm not sure and even don't know how to, where to do it, but i believe we should have some kind of this: ALL (Products) in that measure, right?
Thanks a lot for your help
Hey @pedroccamaraDBI.
Give this a try:
Measure =
VAR MaxDate =
CALCULATE ( MAX ( 'Date'[Date] ), ALLSELECTED ( 'Date'[Date] ) )
VAR Result =
CALCULATE ( MAX ( Sales[Qty Day] ), 'Date'[Date] = MaxDate )
RETURN
Result
Hello @SteveHailey
Thank you so much for your help. You're the 7th person that i asked for help.
Best regards
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
21 | |
19 | |
18 | |
16 | |
13 |
User | Count |
---|---|
39 | |
38 | |
23 | |
21 | |
20 |