Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
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.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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