The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
HI,
I am trying to create a measure to show the total quantity based on Location and Type.
Location | Type | Quantity |
Loc1 | 0 | 10 |
Loc2 | 1 | 2 |
Loc1 | 1 | 4 |
Loc1 | 2 | 3 |
Loc2 | 1 | 4 |
Loc1 | 0 | 5 |
I have the following formula:
Solved! Go to Solution.
Hi,
But this is a measure, correct, not a calculated column? So you can simply use:
Rcvd =
CALCULATE ( SUM ( [Quantity] ), 'Item'[Type] = 0 )
which, when placed in e.g. a table visual with along with Location will produce:
Location | Rcvd |
Loc1 | 15 |
Loc2 |
Regards
Hi,
But this is a measure, correct, not a calculated column? So you can simply use:
Rcvd =
CALCULATE ( SUM ( [Quantity] ), 'Item'[Type] = 0 )
which, when placed in e.g. a table visual with along with Location will produce:
Location | Rcvd |
Loc1 | 15 |
Loc2 |
Regards
Huge facepalm moment for me. Of course that is the answer. I was breaking my head on this trying to base it off my SQL query. Thanks.
User | Count |
---|---|
15 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |