Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I have simple questions regarding dax that I am experimenting.
Pardon for my DAX format I am fairly new to dax.
I have this table
I created a measure named “Multiply” which is the multiplication of the values of the two columns percent and whole number.
As you can see the total for the “Multiply” should display the total for 0.1 up to 1.6 but it displays the multiplication of the total for each of the two rows
I have fixed the formula like this
Now it shows this Which is correct
But when I filter them through a slicer it goes wrong. It goes back to the way it was multiplying the total from the 2 columns
please help me Thank you in advance.
looking forward to all of your replies.
Solved! Go to Solution.
Hi,
Try these measures:
Whole = SUM('Experiment Table'[Whole Number])
Per = SUM('Experiment Table'[Percent])
Measure = IF(HASONEVALUE('Experiment Table'[Product]),SUMX('Experiment Table',[Whole]*[Per]),SUMX(SUMMARIZE(VALUES('Experiment Table'[Product]),[Product],"ABCD",SUMX('Experiment Table',[Whole]*[Per])),[ABCD]))
Hope this helps.
Hi,
Try these measures:
Whole = SUM('Experiment Table'[Whole Number])
Per = SUM('Experiment Table'[Percent])
Measure = IF(HASONEVALUE('Experiment Table'[Product]),SUMX('Experiment Table',[Whole]*[Per]),SUMX(SUMMARIZE(VALUES('Experiment Table'[Product]),[Product],"ABCD",SUMX('Experiment Table',[Whole]*[Per])),[ABCD]))
Hope this helps.
wow it works thank you so much!
Hi Thank tou for the fast response, I haven't tried your formula but I have a few questions about it
what is ABCD for?
I would like to hear out an explanation for your formula so to better understand it as a whole, thank you so much!
You are welcome. The SUMX() function created a virtual Table with unlimited columns. The first and second inputs are the Table (the VALUES() function created a table with 1 column and x rows) and Group by (since the Table [first input] can only have one column, one can group only by that column). The third input is the title of the second column which you want to create in this virtual table.
Please just Google for SUMMARIZE to understand it better.