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
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
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.