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.
My problem is that I've different tables for a portfolio and a benchmark it is being compared to. These tables are not connected, so I assume I can solve my problem using TREATAS().
I've a measure that works as expected:
Solved! Go to Solution.
Hi,
According to your description, i think you have at least three tables and the problem you have due to no relationship berween another two tables.
So i create three tables to test:
And for your second measure, i make some changes to it:
measure 2 =
CALCULATE (
DIVIDE (
SUM ( Position[MARKET_TOTAL_IN_EUR] ),
CALCULATE (
SUM ( Position[MARKET_TOTAL_IN_EUR] ),
ALLSELECTED ( Security[CLASS2] ),
ALLSELECTED ( Security[NAME1] ),
TREATAS ( VALUES ( Index[CLASS2] ), Security[CLASS2] ),
TREATAS ( VALUES ( Security[NAME1] ), Position[name1] )
)
)
)
The result shows:
Here is my test pbix file:
Best Regards,
Giotto Zhi
Hi,
According to your description, i think you have at least three tables and the problem you have due to no relationship berween another two tables.
So i create three tables to test:
And for your second measure, i make some changes to it:
measure 2 =
CALCULATE (
DIVIDE (
SUM ( Position[MARKET_TOTAL_IN_EUR] ),
CALCULATE (
SUM ( Position[MARKET_TOTAL_IN_EUR] ),
ALLSELECTED ( Security[CLASS2] ),
ALLSELECTED ( Security[NAME1] ),
TREATAS ( VALUES ( Index[CLASS2] ), Security[CLASS2] ),
TREATAS ( VALUES ( Security[NAME1] ), Position[name1] )
)
)
)
The result shows:
Here is my test pbix file:
Best Regards,
Giotto Zhi
I am dumbfounded how brilliant and intelligent people come to this forum. Going through your file, I feel like "wow, how smart is this person?". Thank you so much!
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |