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 have Unpivot table which generated from one big table in power query mode. I need to do multiplication using from one column value to selected filter value row wise if Attribute is equal to "N60". but it showing wrong value? e.g
calcDax = SUMX(Table1,IF(Table1[Attribute]="N60",Table1[Value]*SELECTEDVALUE(Factor[N95f_val]),Table1[Value]))
Thanks, S
Do your values have replicate rows (in this case the result is 5X of the expected)? If so, use VALUES to get a single value.
calcDax = SUMX(VALUES(Table1[Value]),CALCULATE(IF(Table1[Attribute]="N60",Table1[Value]*SELECTEDVALUE(Factor[N95f_val]),Table1[Value])))
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
thank you very much ..! I tried on small piece of data , it seems to work good.
I was getting single value for column error in your above dax. I changed the code with SUM. But now problem is - This CalcDax is going to be X-axis value in Scatter Plot. Now it is showing sum which looks not correct.
Any Solution ?
e.g
calcDax = SUMX(VALUES(Table1[Value]),CALCULATE(IF(sum(Table1[Attribute])="N60",max(Table1[Value])*SELECTEDVALUE(Factor[N95f_val]),max(Table1[Value]))))
Hi @sanrajbhar ,
Try the measure as below:
calcDax = IF(Table1[Attribute]="N60",Table1[Value]*SELECTEDVALUE(Factor[N95f_val]),Table1[Value])
If it doesnt work,would you pls upload your .pbix file to one drive business and share the link with us?
Remember to remove the confidential information.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
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 | |
69 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |