powerbi – How do I divide using DAX in Power BI?

powerbi – How do I divide using DAX in Power BI?

Since the code column looks like TY123, thats clearly a string data type column that doesnt make any sense to try to sum or divide.

Since you specify that you want to divide a distinct count of Code by Total Spends, use DISTINCTCOUNT instead of SUM.

measure =
DIVIDE ( DISTINCTCOUNT ( Table[Code] ), SUM ( Table2[Total Spends] ) ) * 100

DISTINCTCOUNT works on any column datatype and is the aggregator you are actually interested in.

powerbi – How do I divide using DAX in Power BI?

Related posts

Leave a Reply

Your email address will not be published.