The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have a measure called "FTE Req 2". When I put it into card visuals and filter those card visuals based on a "type" column ("ACTUAL" and "BUS CAP") I get the expected results: BUS CAP = 103, ACTUAL = 80, as you can see in the first 2 cards of my screenshot.
Next I want to write a measure that subtracts ACTUAL 80 from BUS CAP 103 to give me "-23" which should be on the third card, "FTEReqDifference". However it is giving me an unexpected -3.19.
Since I can't figure out how to write a measure that takes "FTE Req 2" measure and filters itself to do this calculation (eg "FTEReqDifference = [FTE Req 2], type="ACTUAL" - [FTE Req 2], type = "BUS CAP" ", I have written two separate measures to filter FTE Req 2 by both types.
Here is the screenshot with the expected values written in red
Hi @Anonymous ,
Please try.
FTEReqACTUAL = CALCULATE([FTE Req 2],filter(all('table'), 'table'[type] = "ACTUAL") )
FTEReqBUSCAP = CALCULATE([FTE Req 2],filter(all('table'),'table'[type] = "BUS CAP") )
FTEReqDifference = [FTEReqACTUAL]-[FTEReqBUSCAP]
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try this
FTEReqACTUAL = CALCULATE([FTE Req 2],filter('table', 'table'[type] = "ACTUAL") )
FTEReqBUSCAP = CALCULATE([FTE Req 2],filter('table','table'[type] = "BUS CAP") )
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.