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
dolevh
Helper II
Helper II

Remove the display of months June 22 until December 22

Hi, 

 

I have data until the end of 2022 but I want to present the data until today (May 2022) 

this is my dax : 

 

 

Cumulative ProjectTable = 
VAR ABV = CALCULATE ( LASTDATE( ProjectTable[date] ))

RETURN 
IF( SELECTEDVALUE('Date'[Date]) > TODAY(), BLANK(), 
    CALCULATE(COUNT(ProjectTable[id]), 'ProjectTable'[active] = 1,
        FILTER( ALLSELECTED('Date'), 
            'Date'[Date] <= MAX('Date'[Date] ))))  

 

 

But on visualization, it looks like this:

projecttablequery.png

Which Dax do I need to take off the months of June 22 until December 22?

 

thanks all!

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

Hi @dolevh ,

Please refer to my pbix file to see if it helps you.

Create a measure.

_today=IF(MAX('Table'[date])>TODAY(),0,1)

Then put the measure into the filter.

vpollymsft_0-1652166025842.png

 

Then the dates June 22 until December 22 were removed.

vpollymsft_1-1652166103314.png

If I have misunderstood your meaning, please provide your pbix file without privacy information and your desired output.

Best Regards
Community Support Team _ Polly

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
dolevh
Helper II
Helper II

Thanks to all its working 🙂

v-rongtiep-msft
Community Support
Community Support

Hi @dolevh ,

Please refer to my pbix file to see if it helps you.

Create a measure.

_today=IF(MAX('Table'[date])>TODAY(),0,1)

Then put the measure into the filter.

vpollymsft_0-1652166025842.png

 

Then the dates June 22 until December 22 were removed.

vpollymsft_1-1652166103314.png

If I have misunderstood your meaning, please provide your pbix file without privacy information and your desired output.

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

johnt75
Super User
Super User

Add a new column to your date table to return true if the date is on or before TODAY(), then use that as a filter on the chart.

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.

Top Solution Authors