Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
Can anyone help me with this request please?
I have a table visual in PowerBI where it shows the "Amount for Supplier costs" for 4 separate Business Areas.
i.e. PI = £2,971,586.04, TR = £122,591.57 fianl result should show PI = £0 and TR = £3,094,177.61
Charge Type | Amount for Supplier costs | Supplier | Business Area | Internal/External |
Supplier costs | £202,789.82 | HomeRef | Corporate | Interna |
Supplier costs | £0.00 | HomeRef | IN | Internal |
Supplier costs | £2,971,586.04 | HomeRef | PI | Internal |
Supplier costs | £122,591.57 | HomeRef | TR | Internal |
There is a measure used to calculate the Amount for Supplier costs:
Solved! Go to Solution.
Just looked at this again and added the Business area from the case table and all seemed good, but PI has 0 values for internal and external, so ideally I need to add to the measure to only do this calc if the internal external column is internal.
Measure = SWITCH(SELECTEDVALUE('Case'[Business Area]),
"IN",[Amount for Supplier costs],
"Corporate",[Amount for Supplier costs],
"PI",0,
"TR",CALCULATE([Amount for Supplier costs],ALLSELECTED('Case'),'Case'[Business Area] IN {"PI", "TR"})
)
Hi @James_Ma So you can try
Measure =
IF(SELECTEDVALUE('Table'[Internal/External])="Internal",
SWITCH(SELECTEDVALUE('Case'[Business Area]),
"IN",[Amount for Supplier costs],
"Corporate",[Amount for Supplier costs],
"PI",0,
"TR",CALCULATE([Amount for Supplier costs],ALLSELECTED('Case'),'Case'[Business Area] IN {"PI", "TR"})
),
[Amount for Supplier costs])
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi @James_Ma
You can create a new measure like below and use it in the table visual.
Measure =
SWITCH(SELECTEDVALUE('billing'[Business Area]),
"IN",[Amount for Supplier costs],
"Corporate",[Amount for Supplier costs],
"PI",0,
"TR",CALCULATE([Amount for Supplier costs],ALLSELECTED('billing'),'billing'[Business Area] IN {"PI", "TR"})
)
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Just looked at this again and added the Business area from the case table and all seemed good, but PI has 0 values for internal and external, so ideally I need to add to the measure to only do this calc if the internal external column is internal.
Measure = SWITCH(SELECTEDVALUE('Case'[Business Area]),
"IN",[Amount for Supplier costs],
"Corporate",[Amount for Supplier costs],
"PI",0,
"TR",CALCULATE([Amount for Supplier costs],ALLSELECTED('Case'),'Case'[Business Area] IN {"PI", "TR"})
)
Hi @James_Ma So you can try
Measure =
IF(SELECTEDVALUE('Table'[Internal/External])="Internal",
SWITCH(SELECTEDVALUE('Case'[Business Area]),
"IN",[Amount for Supplier costs],
"Corporate",[Amount for Supplier costs],
"PI",0,
"TR",CALCULATE([Amount for Supplier costs],ALLSELECTED('Case'),'Case'[Business Area] IN {"PI", "TR"})
),
[Amount for Supplier costs])
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi Jing,
If I use this measure and there are no filters applied it still shows the PI amount, that is internal, in the PI total so does not count as 0 until I apply the "internal" filter in the visual?
Sorry if I am being a little dumb ob this one.
Thanks Jing, that works exactly how I need it to. Much appreicated help
Hi Jing, thanks for that measure, just to say that hte Business Ares is from a different table called "Case" how would that effect the measure?
I needed to add that I wish to add teh Internal supplier costs from PI to the internal supplier costs for TR.
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |