Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 |
---|---|
109 | |
102 | |
86 | |
77 | |
70 |
User | Count |
---|---|
120 | |
108 | |
98 | |
83 | |
77 |