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 try to calculate the last date from my dataset for the last month, the formula works :
Solved! Go to Solution.
Hi @Anonymous ,
Please update the formula of measure [Nb_devices_M-1] as below and check if it can return the correct result:
Nb_devices_M-1 =
VAR _lastdate = [Measure]
RETURN
CALCULATE (
DISTINCTCOUNT ( Inventory[ID] ),
FILTER ( Inventory, Inventory[History_Date] = _lastdate )
)
If the above one can't help you get the desired result, please provide some sample data in your table 'Inventory' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @Anonymous ,
Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.
Best Regards
Hi @Anonymous ,
Please update the formula of measure [Nb_devices_M-1] as below and check if it can return the correct result:
Nb_devices_M-1 =
VAR _lastdate = [Measure]
RETURN
CALCULATE (
DISTINCTCOUNT ( Inventory[ID] ),
FILTER ( Inventory, Inventory[History_Date] = _lastdate )
)
If the above one can't help you get the desired result, please provide some sample data in your table 'Inventory' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
@Anonymous , openingbalancemonth of the month gives the value of last date of last month
You have to use the date table joined with History_Date
calculate(DISTINCTCOUNT(Inventory[ID]), openingbalancemonth (Date[Date]))
or
calculate(lastnonblankvalues(Inventory[History_Date], DISTINCTCOUNT(Inventory[ID])), previousmonth(Date[Date]))
Power BI Allocating Targets: openingbalancemonth, openingbalancequarter, openingbalanceyear: https://youtu.be/6lzYOXI5wfo
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 |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
42 | |
33 | |
30 | |
18 | |
18 |