Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Good morning!
I ask you a question, which is the best way to make this query:
From Table "X" I have to:
Count Number of Lines
Where Column 1 is not Empty
AND Column 3 is not "A"
AND Column 4 is not empty
And another condition is according to the type:
If "Type" is "1" has to start with A, C, E
and if "Type" is "2" he has to start with F, H, K
Is it possible to do this in DAX? (I think it would be quite complicated) or use the display and page filters.
Thank you!
Regards!
Solved! Go to Solution.
The first one
countrows(filter(X,not(isbalnk(X[Column 1])) && X[Column 3] <> "A" && not(isbalnk(X[Column 1]))))
Orcalculate(countrows(X),filter(X,not(isbalnk(X[Column 1])) && X[Column 3] <> "A" && not(isbalnk(X[Column 1]))))
Not sure where you want 2nd one and column name of start with
calculate(countrows(X),
("Type" = "1" && left(X[Column]) in {"A","C","E"})
|| ("Type" = "2" && left(X[Column]) in {"F","H","K"}))
The first one
countrows(filter(X,not(isbalnk(X[Column 1])) && X[Column 3] <> "A" && not(isbalnk(X[Column 1]))))
Orcalculate(countrows(X),filter(X,not(isbalnk(X[Column 1])) && X[Column 3] <> "A" && not(isbalnk(X[Column 1]))))
Not sure where you want 2nd one and column name of start with
calculate(countrows(X),
("Type" = "1" && left(X[Column]) in {"A","C","E"})
|| ("Type" = "2" && left(X[Column]) in {"F","H","K"}))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
147 | |
109 | |
107 | |
85 | |
63 |