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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
lutat9063
New Member

Matrix Dynamic Column headers

Hi ,

I have data in below format 

 

IDNameCurrent ValuePrevious ValueCurrent Fical YearPrevious Year
111Address104 Avenue103 AvenueFY25FY24
112NameJohnMarkFY25FY24
113NameTedSamFY24FY23
114Address111 Ave116 AveFY24FY23

 

When Fiscal Year Dropdown selected FY25 then matrix  show data in below dyamic format

 

lutat9063_2-1708760396703.png

 

 

lutat9063_0-1708760252600.png

 

 

When Fiscal Year Dropdown selected FY24 then matrix  show data in below dyamic format

 

lutat9063_3-1708760421515.png

 

lutat9063_1-1708760284650.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @lutat9063 ,
Here's my test data:

vheqmsft_0-1708932030104.png

1.Create 4 measures

FY24 = 
    CALCULATE(
        MAX('Table'[Current Value]),
        FILTER(
            'Table',
            'Table'[Current Fical Year] = "FY24"
        )
    )
Privious(FY23) = 
    CALCULATE(
        MAX('Table'[Previous Value]),
        FILTER(
            'Table',
            'Table'[Previous Year] = "FY23"
        )
    )
FY25 = 
    CALCULATE(
        MAX('Table'[Current Value]),
        FILTER(
            'Table',
            'Table'[Current Fical Year] = "FY25"
        )
    )
Privious(FY24) = 
    CALCULATE(
        MAX('Table'[Previous Value]),
        FILTER(
            'Table',
            'Table'[Previous Year] = "FY24"
        )
    )

2.Create filed parameter

vheqmsft_1-1708932146129.png

vheqmsft_2-1708932165111.png

3.Apply parameter as matrix value
4.Create a Fical Year in Parameter table

Fical Year = IF(Parameter[Parameter Order] = 0 || Parameter[Parameter Order] = 2, "FY25", "FY24")

vheqmsft_3-1708932251950.png

5. Create slicers based on Fical Year

vheqmsft_4-1708932313938.png

6.Final output

vheqmsft_5-1708932355758.png

vheqmsft_6-1708932363746.png

 

Best regards,

Albert He

 

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

 

 

 

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @lutat9063 ,
Here's my test data:

vheqmsft_0-1708932030104.png

1.Create 4 measures

FY24 = 
    CALCULATE(
        MAX('Table'[Current Value]),
        FILTER(
            'Table',
            'Table'[Current Fical Year] = "FY24"
        )
    )
Privious(FY23) = 
    CALCULATE(
        MAX('Table'[Previous Value]),
        FILTER(
            'Table',
            'Table'[Previous Year] = "FY23"
        )
    )
FY25 = 
    CALCULATE(
        MAX('Table'[Current Value]),
        FILTER(
            'Table',
            'Table'[Current Fical Year] = "FY25"
        )
    )
Privious(FY24) = 
    CALCULATE(
        MAX('Table'[Previous Value]),
        FILTER(
            'Table',
            'Table'[Previous Year] = "FY24"
        )
    )

2.Create filed parameter

vheqmsft_1-1708932146129.png

vheqmsft_2-1708932165111.png

3.Apply parameter as matrix value
4.Create a Fical Year in Parameter table

Fical Year = IF(Parameter[Parameter Order] = 0 || Parameter[Parameter Order] = 2, "FY25", "FY24")

vheqmsft_3-1708932251950.png

5. Create slicers based on Fical Year

vheqmsft_4-1708932313938.png

6.Final output

vheqmsft_5-1708932355758.png

vheqmsft_6-1708932363746.png

 

Best regards,

Albert He

 

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

 

 

 

 

 

lutat9063
New Member

Ritaf1983
Super User
Super User

Hi @lutat9063 
Yes, this is possible with a dynamic measures workaround.

Please refer to the linked videos:

https://www.youtube.com/watch?v=zbKNyFu2BOo

https://www.youtube.com/watch?v=6B-n0xM8ZvA

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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