Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Say I have this measure, which is certainly direct:
# Card payments =
calculate([# of Total Pmts], Payment[PaymentTypeID] = 2) +
calculate([# of Total Pmts], Payment[Payment Type] = 3) +
calculate([# of Total Pmts], Payment[Payment Type] = 5) +
calculate([# of Total Pmts], Payment[Payment Type] = 7) +
calculate([# of Total Pmts], Payment[Payment Type] = 😎 +
calculate([# of Total Pmts], Payment[Payment Type] = 9) +
calculate([# of Total Pmts], Payment[Payment Type] = 11)
But say in SQL, one could do something like:
SELECT
COUNT(p.id)
WHERE
p.type IN (2,3,5,7,8,9,11)
FROM
TableTable p
I'm kinda missing the IN here. There's definitely different ways to write my measure above, but what way would be the cleanest/fastest to write?
Solved! Go to Solution.
Go for the containsrow function in dax to solve the query.I hope this helps ! feel free to reavh out,oif the problem still persists
Card payments =calculate([# of Total Pmts],CONTAINSROW ({2,3,5,7,8,9,11},
Go for the containsrow function in dax to solve the query.I hope this helps ! feel free to reavh out,oif the problem still persists
Card payments =calculate([# of Total Pmts],CONTAINSROW ({2,3,5,7,8,9,11},
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
60 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |