Reply
George1973
Helper V
Helper V

Power BI How to Create Dynamic Conditional Column in matrix visual

Hi All,

I have a matrix visual having some columns and measures-in-a-row:

George1973_0-1711959612971.png

In a master data table, there are several columns, displaing Group_Discounts based on the year.. Meaning that 2024,2025,...2030 years have differennt discount rates for each company.

George1973_1-1711960095681.png

 



I have created a measure that shows the "% Rate" for each quater based on the year chosen in slicer (Green Arrow Direction).. 

 

Qtr Sales Bonus Var = 
VAR ChooseYear=SELECTEDVALUE(DateKey[Year])
VAR Leader=SELECTEDVALUE(C_CLIENTS[Client_Group])
RETURN
SWITCH(TRUE(),
    ChooseYear=2024,LOOKUPVALUE(Companies_Sales_Plan[2024_Motiv_Qtr],Companies_Sales_Plan[ლიდერის კოდი],Leader),
    ChooseYear=2025,LOOKUPVALUE(Companies_Sales_Plan[2025_Motiv_Qtr],Companies_Sales_Plan[ლიდერის კოდი],Leader),
    ChooseYear=2026,LOOKUPVALUE(Companies_Sales_Plan[2026_Motiv_Qtr],Companies_Sales_Plan[ლიდერის კოდი],Leader),
    ChooseYear=2027,LOOKUPVALUE(Companies_Sales_Plan[2027_Motiv_Qtr],Companies_Sales_Plan[ლიდერის კოდი],Leader),
    ChooseYear=2028,LOOKUPVALUE(Companies_Sales_Plan[2028_Motiv_Qtr],Companies_Sales_Plan[ლიდერის კოდი],Leader),
    ChooseYear=2029,LOOKUPVALUE(Companies_Sales_Plan[2029_Motiv_Qtr],Companies_Sales_Plan[ლიდერის კოდი],Leader),
    ChooseYear=2030,LOOKUPVALUE(Companies_Sales_Plan[2030_Motiv_Qtr],Companies_Sales_Plan[ლიდერის კოდი],Leader),
    BLANK())

 


However, I want to have it kept as a "Dynamic Column" instead of the "Red" marked static column from the master table.

Please advise your solution. So far, I have never tried to create a "Dynamic" column in Matrix visual, thinkin that column is a matrix should be always a static column from the master table.

3 REPLIES 3
avatar user
Anonymous
Not applicable

Thank you @lbendlin for your prompt reply.

Hi @George1973 ,
May I ask if you have tried the suggestions above? If the suggestion helped you, you might consider marking it as a solution. If the problem has not yet been solved, could you provide more data (excluding private information) so that we can better understand and solve the problem you are experiencing.

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Unpivot your data in Power Query to bring it into a usable format.

Hi,

 

Thanks for your suggestion. I  will try, but from this first perspective, I'm not sure that it is a right solution.

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)