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 created a dax measure to sum total sales but it has a few if conditions to go through before doing the calulation. First I am checking for the currency then check if a line item is in a list of specified items. if both conditions are true then it will do currency conversion in USD and multiply the some by -1 to make it positive. the numbers in the column are negative hence I want to multiply by -1 to make it positive.
When I put the function in the matrics table it does the conversion and sums the total however its not summing the results as positive.
How can I fix this.
var x = values(table[numbers])
Measure if(selected currency = "CAN", if x in {1,2,3,4,5,6,7}, calculate(sumx(table2, (table2[sales_amount]/related(currency_table[fx_rate])*-1)),calculate(sumx(table2, (table2[sales_amount]/related(currency_table[fx_rate])))
@Sagejah9 First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
@Sagejah9 Generally using ISINSCOPE and HASONEVALUE is better than HASONEFILTER for these sorts of things.
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 |
---|---|
109 | |
108 | |
88 | |
75 | |
66 |
User | Count |
---|---|
125 | |
114 | |
98 | |
81 | |
73 |