Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi everyone!
I'm new to Microsoft Power Bi but there is the thing I want to do:
I've got a column called "cutting" with 0 (machine isn't working) and 1 (machine is working).
I want to create a measure called "UT" where the amount of rows with "cutting" = 1 is divided by the total amount of columns in the table 'Tabelle1'. The DAX formula is the following:
UT = CALCULATE(COUNT('Tabelle1'[cutting])/COUNTROWS('Tabelle1'); 'Tabelle1'[cutting] = 1)
When I try to display the measure on my dashboard, the field is blank.
I have already looked at different forum posts similar to my problem, but nothing seems to work.
Can anyone help?
Thanks
Tim
Solved! Go to Solution.
You should specify the context into entire table in your calculation formula.
UT = CALCULATE ( COUNT ( 'Tabelle1'[cutting] ), FILTER ( ALL ( 'Tabelle1' ), 'Tabelle1'[cutting] = 1 ) ) / COUNTROWS ( 'Tabelle1' )
Regards,
You should specify the context into entire table in your calculation formula.
UT = CALCULATE ( COUNT ( 'Tabelle1'[cutting] ), FILTER ( ALL ( 'Tabelle1' ), 'Tabelle1'[cutting] = 1 ) ) / COUNTROWS ( 'Tabelle1' )
Regards,
please clarify what is meant by: "...the total amount of columns in table.....
how many columns and what are their names - a small sampling of the data set would help
User | Count |
---|---|
103 | |
90 | |
78 | |
72 | |
68 |
User | Count |
---|---|
108 | |
96 | |
95 | |
74 | |
71 |