Forum Discussion
Anonymous
6 years agoNot applicable
DAX Switch True
DAX experts, Here is how my data is set up: ID: Reason 1 Reason 2 Reason 3 Reason 4 1 Correct Incorrect Incorrect Correct 2 ...
- 6 years ago
So, with the structure of your data you can only get something like this :
Otherwise you need to transform your data, for that u need to use SQL,
here i'm ganna start by creating my table Check :
Then i can tranform it also with Sql :
So finaly i can get what i need on Power BI :
Rahal
6 years agoFrequent Visitor
Hi, here's what u can do :
Test =
VAR R1=CALCULATE(count(Check[Reason 1]);Check[Reason 1]="Incorrect")
VAR R2=CALCULATE(count(Check[Reason 2]);Check[Reason 2]="Incorrect")
VAR R3=CALCULATE(count(Check[Reason 3]);Check[Reason 3]="Incorrect")
VAR R4=CALCULATE(count(Check[Reason 4]);Check[Reason 4]="Incorrect")
RETURN
"Reason1 = " & R1 & " ; Reason2 = " & R2 & " ; Reason3 = " & R3 & " ; Reason4 = " & R4
- Anonymous6 years agoNot applicable
Is that considered a new table, column or measure?
Additionally the ; that you have on lines 3-6 I cant not get to work. Should that be a comma?