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.
I was wondering if there is any way to have a SUM column, but limit wich values are added.
This would be a simplified example of what I want to achieve:
Original data
Unit | Branch | Date |
XYZ1 | Branch 2 | 2019/6/1 |
XYZ2 | Headquarters | 2019/6/2 |
XYZ3 | Branch 1 | 2019/6/3 |
XYZ4 | Branch 1 | 2019/6/4 |
XYZ5 | Branch 3 | 2019/6/5 |
XYZ6 | Branch 3 | 2019/6/6 |
XYZ7 | Branch 1 | 2019/6/7 |
XYZ8 | Branch 3 | 2019/6/8 |
XYZ9 | Branch 2 | 2019/6/9 |
XYZ10 | Branch 1 | 2019/6/10 |
XYZ11 | Branch 3 | 2019/6/11 |
XYZ12 | Headquarters | 2019/6/12 |
XYZ13 | Branch 2 | 2019/6/13 |
XYZ14 | Branch 3 | 2019/6/14 |
XYZ15 | Branch 3 | 2019/6/15 |
Table in Power BI
Units | |
June | |
Branch 1 | 4 |
Branch 2 | 3 |
Branch 3 | 6 |
Headquarters | 2 |
13 |
In the table above, the total is calculated as SUM(B3,B4,B5), leaving the 2 units of "Headquarters" out of the result, but still shown.
My current formula in Power BI is: Units= if([Unit]<>"",1,0), which would give a total of 15
Solved! Go to Solution.
Hi @avalos
try this MEASURE
Measure = IF ( HASONEFILTER ( Table1[Branch] ), COUNT ( Table1[Unit] ), SUMX ( FILTER ( Table1, Table1[Branch] <> "Headquarters" ), CALCULATE ( COUNT ( Table1[Unit] ) ) ) )
Hi @avalos
try this MEASURE
Measure = IF ( HASONEFILTER ( Table1[Branch] ), COUNT ( Table1[Unit] ), SUMX ( FILTER ( Table1, Table1[Branch] <> "Headquarters" ), CALCULATE ( COUNT ( Table1[Unit] ) ) ) )
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 |
---|---|
49 | |
25 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |