Forum Discussion
Conditions for Columns
Hi All,
I have senario like below table .
Main Table
SNO MG MU MP LG LU Percentage1 Percentage2
1 XX AA BB CC DD 80% 75%
2 XX AA BB CC DD 75% 75%
Bridge Table
Sno Group Attributes
1 MG XX
2 MG XX
3 MU AA
4 MU AA
5 MP BB
6 MP BB
7 LG CC
8 LG CC
9 LU DD
10 LU DD
Based on the SNO created relationship. So far it's fine. Now Group column from the bridge table used in the slicer. In the slicer it's coming like
MG
MU
MP
LG
LU
In Table visual i have used GROUP and Attributes columns from the Bridge table. Table will be look like below
Group Attributes Calculated values
MG XX
MG XX
MU AA
MU AA
MP BB
MP BB
LG CC
LG CC
LU DD
LU DD
Now If i select MG or MP or MU from slicer it should display Percentage 1 values
If i select LG or LU from slicer it should display Percentage 2 values in the calculated column as i mentioned above table.
I hope it's clear. Is it possible in Power BI, If yes colud u plese let me know.
Thanks
8 Replies
- AnonymousNot applicable
"I woluld like to give condition like if it is MG, MU then in column1 it should come Yes , if it is LG, LU then in column 2 it should come No. "
Can you clarify?
If MG=MU?I guess that you're showing an actual table (and not a visual), so you can do that either in PowerQuery M or in DAX. Both solutions are equivalent.
I would do
Column1=IF(Table[MG]=Table[MU];"Yes")but you first need to clarify the question
- haribPost Patron
Updated the Requirment. Can u please give me the solution.
- Tahreem24Super User
- Tahreem24Super User
Or try this to get percentage value:
Column2 = if(Sheet7[Group] in {"MG","MU","MP"},0.01,0.02)Don't for get to hit Thumbs up for support and accept this as a solution if it helps you!