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 Friends ,
My apology if the question has been asked in the forum already , I tried to search , but could not find one.
Here is my question -
I have a measure M1 that calcuates number of distinct "Currency Code" based on the filters selected in the slicers.
Based on the measure I am creating a calculated column called "FinalCurrency"
The requirement is if the value of M1 is 3 , then the calculated column "FinalCurrency" will have "Euro" ,else "Other"
But my problem is two fold -
1. In calculated column , if I use the measure M1 ,it does not carry the filter context selected by the user , instead it considers the entire table data , how do I pass the filter context of the measure M1 in the calculated column
2. Is there a way I can create a non-numeric measure , e.g. Measure M2 to have value "Euro" if M1 = 3
In that case I will not have to create a calculated column
Hope I could able to make myself clear in my question
Thanks in advance for your kind reply
Solved! Go to Solution.
Hi @jimmymitra
Answering your questions:
M2 = IF ( [M1] = 3, "Euro", "Other" )This measure will work in general, but there is a possibility you would have to wrap the expression in CALCULATE(..., ALLSELECTED() ) to ensure it returns the same value in all filter contexts within a particular report page (sounds like that's the behaviour you need).
Regards,
Owen
Hi @jimmymitra
Answering your questions:
M2 = IF ( [M1] = 3, "Euro", "Other" )This measure will work in general, but there is a possibility you would have to wrap the expression in CALCULATE(..., ALLSELECTED() ) to ensure it returns the same value in all filter contexts within a particular report page (sounds like that's the behaviour you need).
Regards,
Owen
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |