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.
Hello PowerBI Masters! Hope all is well.
So I have a table with different types of premiums with their respective values.
ID Premium Value
1 InvoicePrem 500
2 AO Prem 100
3 Inst Prem 50
4 EXP Prem 250
5 Prem 300
What Im trying to do is basically add all the premiums for ID's only equal 1,3,4
I know I can create 3 different measures and add them up at the end or just basically use the filters tab, but is there a faster way to incorporate all the ID's within the same formula? For example something like this:
Solved! Go to Solution.
Hi @mvelazquez ,
Measure = CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[ID] = 1 || 'Table'[ID] = 3 || 'Table'[ID] = 4 ) )
Pbix as attached.
Hi @mvelazquez ,
Measure = CALCULATE ( SUM ( 'Table'[Value] ), FILTER ( 'Table', 'Table'[ID] = 1 || 'Table'[ID] = 3 || 'Table'[ID] = 4 ) )
Pbix as attached.
Since OR function accepts just two arguments you can use double "|" so your formula should go something like this:
CALCULATE ( SUM ( TRANS_BROKER[Value] ), FILTER ( TRANS_BROKER, TRANS_BROKER[ID] = 1 || TRANS_BROKER[ID] = 3 || TRANS_BROKER[ID] = 4 ) )
Proud to be a Super User!
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |