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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
myou
Helper II
Helper II

How to show Current Month and Previous Month Data for Selected Month

12.PNGI

 

I Have  Date Table that has relation ship with other sales data table

I want when I press July the data from Jan until July appear

so for example in the image when I press July, the closingendcatered column will include data from Jan until July

pbix file:

https://www.dropbox.com/s/upz9cbtsvfc48b9/demo.pbix?dl=0

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

Hi @myou ,

 

Firstly, we should make the relationship between fact table and date table inactive. Atfer that, to create a measure as below and add it to the table visual.

 

Measure = 
VAR maxdate =
    SELECTEDVALUE ( Dates[Date] )
RETURN
    IF ( MAX ( Table1[closingENDcatered2020] ) <= maxdate, 1, BLANK () )

Capture.PNG

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @myou ,

 

Firstly, we should make the relationship between fact table and date table inactive. Atfer that, to create a measure as below and add it to the table visual.

 

Measure = 
VAR maxdate =
    SELECTEDVALUE ( Dates[Date] )
RETURN
    IF ( MAX ( Table1[closingENDcatered2020] ) <= maxdate, 1, BLANK () )

Capture.PNG

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors