The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi friends!
I've got a Matrix and i need to get the result of divide one columm by another (Both are distinct count fields). For example:
I need to get the result of 24116/1290 at %.
And, finally I need to take this too:
343456 divide by 1290.
How can I do it?
I've tried to Add a column but i can't put the column name.
Solved! Go to Solution.
Hey @marcss44 ,
you have to create two base measures like so:
M1 = DISTINCTCOUNT(<'table'[column1]>)
and this
M2 = DISTINCTCOUNT(<'table'[column2]>)
Based on this you can can create a third measure that divides the measures M1 and M2 rowwise like so:
M3 = DIVIDE( [M1], [M2] )
And the 4th measure divides the M2 value by the Total value of M1:
M4 = DIVIDE( [M2] , CALCULATE( [M1] , ALL( <'thetableusedonrows'[rowheader] ) ) )
Then you can use all 4 measures in the value well of the Matrix visual.
Hopefully, this helps to tackle your challenge.
Regards,
Tom
Hey @marcss44 ,
you have to create two base measures like so:
M1 = DISTINCTCOUNT(<'table'[column1]>)
and this
M2 = DISTINCTCOUNT(<'table'[column2]>)
Based on this you can can create a third measure that divides the measures M1 and M2 rowwise like so:
M3 = DIVIDE( [M1], [M2] )
And the 4th measure divides the M2 value by the Total value of M1:
M4 = DIVIDE( [M2] , CALCULATE( [M1] , ALL( <'thetableusedonrows'[rowheader] ) ) )
Then you can use all 4 measures in the value well of the Matrix visual.
Hopefully, this helps to tackle your challenge.
Regards,
Tom
Hi again friend! How can I use row headers and obtain the division correctly?
Now I've added new row header and the calculate filed is not working:
In green the new row header
Thank you very much!
User | Count |
---|---|
69 | |
68 | |
65 | |
54 | |
28 |
User | Count |
---|---|
112 | |
82 | |
65 | |
48 | |
43 |