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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Lushernandezf
New Member

Mostrar solo los datos en una matriz donde el ultimo mes tenga datos

Tengo una matriz con %Dato (columnas) y producto (filas). Busco que se muestre solo los %datos donde el ultimo mes tenga datos. Ejemplo: muestre solo las filas de Producto1, Producto4, Producto6, Producto8 y Producto9.

Lushernandezf_0-1755614530452.png

1 ACCEPTED SOLUTION
v-nmadadi-msft
Community Support
Community Support

Hi @Lushernandezf ,
Thanks for reaching out to the Microsoft fabric community forum.

To achieve your desired output, you need to create a DAX measure  which will output a Flag value of 1 when the required condition which is in your case having data for the last month.
You can use that Flag value to filter out the unnecessary data

vnmadadimsft_0-1755691742433.png

 



Here is the DAX measure

Flag_August =

VAR HasDataInAugust =

    CALCULATE (

        COUNTROWS ( 'product' ),

        'Product'[Month] = "August"

    )

RETURN

IF ( HasDataInAugust > 0, 1, 0 )

Attaching the .PBIX file for reference.

I hope this information helps. Please do let us know if you have any further queries.
Thank you

View solution in original post

3 REPLIES 3
v-nmadadi-msft
Community Support
Community Support

Hi @Lushernandezf ,
Thanks for reaching out to the Microsoft fabric community forum.

To achieve your desired output, you need to create a DAX measure  which will output a Flag value of 1 when the required condition which is in your case having data for the last month.
You can use that Flag value to filter out the unnecessary data

vnmadadimsft_0-1755691742433.png

 



Here is the DAX measure

Flag_August =

VAR HasDataInAugust =

    CALCULATE (

        COUNTROWS ( 'product' ),

        'Product'[Month] = "August"

    )

RETURN

IF ( HasDataInAugust > 0, 1, 0 )

Attaching the .PBIX file for reference.

I hope this information helps. Please do let us know if you have any further queries.
Thank you

Muchas Gracias! me ha funcionado, justo lo que necesitaba

FBergamaschi
Super User
Super User

You need to identify the last year-month in a column of the calendar table and then write a DAX measure to show values of the %Data measure only when the last year-month is in context. To implement this, either upload a pbix file in some cloud service and hsare the link here or please include in your answer, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.

 

Need help uploading data? click here

 

Want faster answers? click here

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.