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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi All,
Basically I am unable to create relation between two tables.There is one table with Static data :Type,key service level(consider as formula names). Another table with raw data but both these table have nothing in common.Now we need to calculate some measures and store it in respective keyservicxe level.
When I try to store it in respective row, because I dnt have relation,all row gets filled by the same value.
Model table :
KeyService level | March month |
A1resolution -a1 | 56 |
B3resolutioncritical-a2 | 75 |
Can we compare the row values(a1,a2) with the measures name ? In that way we can store it in specific rows as required.
Solved! Go to Solution.
SWITCH is a function used in measures /calculated columns wich is essentially nested IFs executed in order. So the measure in this case is checking the filter context (established by SELECTEDVALUE) and returning the corresponding measure. So the first statement checks whether the conext is "A1" and if true returns the measure [M1] and so on...Make sense?
Proud to be a Super User!
Paul on Linkedin.
Try
TheMeasures =
SWITCH(SELECTEDVALUE (Table1[Key Service]),
"A1", [M1],
"A1.1", [M6],
"A2", [M2])
Proud to be a Super User!
Paul on Linkedin.
Hi PaulDBrown,
Thanks , this actually somewhat worked. Can you please explain what the qwuery is actually doing as that would be helpful for me to learn.
SWITCH is a function used in measures /calculated columns wich is essentially nested IFs executed in order. So the measure in this case is checking the filter context (established by SELECTEDVALUE) and returning the corresponding measure. So the first statement checks whether the conext is "A1" and if true returns the measure [M1] and so on...Make sense?
Proud to be a Super User!
Paul on Linkedin.
Can you explain brief please ? I am a begginer.
Do you mean to create a new column using the above switch statement ? if so in which table ? The one having static data or the one where we have calculated the measures.
You need to create a new measure with the code. Then create a new table visual, add the fields from Table 1 and add the measure
Proud to be a Super User!
Paul on Linkedin.
@FaisalImam , Not very clear
measure like
a1 = calculate(sum(Table[March Month]) , Filter(all(Table[Level]) Table[level] ="a1") )
a2 = calculate(sum(Table[March Month]) , Filter(all(Table[Level]) Table[level] ="a2") )
No Actually you did not get my point.
The table , I have shown is how it will be coming on the dashboard.
Column1- Key Service Level ( has all static values in table1 )
Column 2 - Month( has values calculated from another table - table 2 in which everymonth data will be refreshed)
My problem : I am unable to put the values that I have calculated in the right row because we don't have any relation..
Example :
Table 1
Key Service | Expected |
A1 | 95% |
A1.1 | 65% |
A2 | 90% |
Table 2 :
inc | time | period |
sghdf | 7 | 4 |
srwetbnjl | 9 | 1 |
sdgyfumbm | 4 | 2 |
Now from table 2 ,I have calculated several measures let it be M1,M2,M6
Now how it needs to be viewd on dashboard:
key service level | expected | Measures |
A1 | 95% | M1 |
A1.1 | 65% | M6 |
A2 | 90% | M2 |
What logic to use top have such relation. We don't have any relation between measures and the key service level.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.