cancel
Showing results for 
Search instead for 
Did you mean: 
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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors