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 want to create a dynamic measure where when I choose the value from the slicer, the row that contains the data from slicer with have an updated formula, other will have another formula.
For example:
If I choose product A, then the sales for product A would be calculated as 100 + sum(Sales)
Other products 200 + sum(Sales)
Solved! Go to Solution.
Hi @mjmjn2611 ,
To my knowledge, you need to create a new table for slicer:
ForSlicer = VALUES('Table'[Product])
Then please try this:
Result = IF( MAX('Table'[Product]) in ALLSELECTED(ForSlicer[Product]),100+SUM('Table'[Sales]), 200+SUM('Table'[Sales]))
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mjmjn2611 ,
To my knowledge, you need to create a new table for slicer:
ForSlicer = VALUES('Table'[Product])
Then please try this:
Result = IF( MAX('Table'[Product]) in ALLSELECTED(ForSlicer[Product]),100+SUM('Table'[Sales]), 200+SUM('Table'[Sales]))
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@mjmjn2611 , Try a measure
if(countx(filter(Table, Table[Product] = "Product A"),[Product]) >0 , 100 + sum(Sales) , 200 + sum(Sales) )
Thank you for your solution.
The name of the product is not constant, I get it from the slicer. I am using Selectedvalue(slicer) to get the value for the product name. It doesn't work.
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 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |