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
Anonymous
Not applicable

Line Chart - Show only line with data until today

 

 

Dear all,

I have a line chart where i am showing the cummulative values for each month for actual period vs same period last year. 
For the current month shown, November in this example (as per this month), I would only show the days of the month as per the day of the report (as per today for example), for the actual period line.

 

Line Chart.png

 Do you know if this is possible? and if being possible, how can it be done?

This is what i would like Line Chart Objective.png

 

Thanks in advance,

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

As mentioned above, you may take advantage of Show items with no data and Visual level filters.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

 

@v-chuncz-msft

I did try your solution but does not affect the view and does not get the wished result.

Greg_Deckler
Super User
Super User

Depends on that calculation. Is that a measure? If so, then you should be able to use an IF statement to either return a value or BLANK().


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler

Formulaes used are as follow:

 

Calculate cumulative:

Cumulative GPSales GC = CALCULATE([GPSalesGC_CY];FILTER(ALLSELECTED('Date'[Date].[Day]);'Date'[Date].[Day]<=MAX('Date'[Date].[Day])))

 

Where or how should i apply the IF statement?

 

Thanks and kind regards,

 

 

Cumulative GPSales GC = 

IF(LASTDATE('Date'[Date].[Day]) >= TODAY(),
CALCULATE([GPSalesGC_CY];FILTER(ALLSELECTED('Date'[Date].
[Day]);'Date'[Date].[Day]<=MAX('Date'[Date].[Day]))),
BLANK()
)

Or something like that... 

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.