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.
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},
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 |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |