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 All,
Can I please have some help with the following? I created a measure that projects our monthly orders.
If I select the current month using a slicer it take our To Date Projected Orders, divided by MTD Order Target, then multiplies the result by the Total Order Target to give us a projetion. If I select a past month it does the same calculation and gives me the correct result for the previous months.
However when I select both this month and last month (as I want to get a view of the quarter) it does the full calculation over both months target and orders and gives me the wrong result.
I would like to add an IF statement saying, IF the month in the Slicer is this month do the following. IF it isnt this month, just give me the 'Accepted Orders'.
I tried Selectedvalue but this doesnt seem like the correct function. Below is my current measure.
Is anyone able to help or point me in the right direction?
Thanks
Roger
Solved! Go to Solution.
Hi @Rogerh ,
"Thank you for your reply. It might be worth simplifying my request.
Is there a Dax function that will allow you say.
If the slicer has the current month selected, do one thing. If it has anything else selected do something else. I should be able to work it out if I can find the correct function. Otherwise happy to put more detail in and send it over. Cheers"
When you select multiple months, do you want the measure results to be aggregated again?
Maybe you can create another measure like this.
Sum of Test =
SUMX(
'Platform - Targets'
[Test]
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Rogerh , Not very clear. Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
How are you getting MTD ?
If you are using time intelligence then
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
You can get last month
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
Hi @amitchandak
Thank you for your reply. It might be worth simplifying my request.
Is there a Dax function that will allow you say.
If the slicer has the current month selected, do one thing. If it has anything else selected do something else. I should be able to work it out if I can find the correct function. Otherwise happy to put more detail in and send it over. Cheers
Hi @Rogerh ,
"Thank you for your reply. It might be worth simplifying my request.
Is there a Dax function that will allow you say.
If the slicer has the current month selected, do one thing. If it has anything else selected do something else. I should be able to work it out if I can find the correct function. Otherwise happy to put more detail in and send it over. Cheers"
When you select multiple months, do you want the measure results to be aggregated again?
Maybe you can create another measure like this.
Sum of Test =
SUMX(
'Platform - Targets'
[Test]
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
111 | |
94 | |
83 | |
66 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |