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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
v-heq-msft
Community Support
Community Support

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
v-heq-msft
Community Support
Community Support

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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