Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I am trying to apply virtual relationship using TREATAS with the code that I have or modify current code to make it work.
I am sharing my Pbix file here.
I am trying to fix measure called "Col2".
Here is current code:
Expected outcome for Col2 should be 27.333 for Royal T and 79.333 for Royal P (for May 2021).
But, because there is no relationship, outcome just got all mixed up from this table called "Index".
table "Index"
Expected output for May 2021:
Thanks for help!
Solved! Go to Solution.
If you're trying to match the Rating in that table, why not something much simpler like
Col2 =
IF (
HASONEVALUE ( Main[ProviderName] ),
VAR Rating = [Rating]
RETURN
CALCULATE (
SELECTEDVALUE ( Index[IndexPoint] ),
Index[IndexRating] = Rating
)
)
or even
Col2 =
LOOKUPVALUE (
Index[IndexPoint],
Index[ProcessingDate], SELECTEDVALUE ( 'Date Bridge'[ProcessingDate] ),
Index[IndexRating], [Rating]
)
If you're trying to match the Rating in that table, why not something much simpler like
Col2 =
IF (
HASONEVALUE ( Main[ProviderName] ),
VAR Rating = [Rating]
RETURN
CALCULATE (
SELECTEDVALUE ( Index[IndexPoint] ),
Index[IndexRating] = Rating
)
)
or even
Col2 =
LOOKUPVALUE (
Index[IndexPoint],
Index[ProcessingDate], SELECTEDVALUE ( 'Date Bridge'[ProcessingDate] ),
Index[IndexRating], [Rating]
)
@AlexisOlson It is amazing how you come up with the solution. I appreciated it so much for your help!
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |