Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |