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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hnoriega
Frequent Visitor

Choose period in column matrix

Hi, I have a matrix with information. I want to show the sales depending on what the user wants (month, trimester or year)

 

 

The column of the matrix should change depending on that:

2017-10-19 15_08_05-Cadenas - Power BI Desktop.png

 

 

This is what I actually have but it´s not working (I cannot add as a column in the matrix)

2017-10-19 15_08_25-Cadenas - Power BI Desktop.png

 

ATM =
IF (
ISFILTERED ( Periodo[Valor]) && HASONEVALUE (Periodo[Valor] ),
if(LASTNONBLANK (Periodo[Valor], 0 )="Año",
VALUES(Informe_Cadenas_Final[YearMonth]),
if(LASTNONBLANK (Table1[Valor], 0 )="Trim",
values(Informe_Cadenas_Final[YearMonth])
)
),
VALUES(Informe_Cadenas_Final[Mes])
)

 

 

 

Is there any solution?

 

Thanks!!

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @hnoriega,

 

I modified your formula, you can try it if it suitable for your requirement.

ATM =
IF (
    SELECTEDVALUE ( Table1[Valor] ) <> BLANK (),
    LASTNONBLANK(Informe_Cadenas_Final[YearMonth],[YearMonth] ),
    SUM( Informe_Cadenas_Final[Mes] )
)

If above not help, it will be help if you share some sample data for test.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.