cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
airfreighter Helper III
Helper III

TOTALYTD without date reference

Hi folks

 

I am stuck with something. Generally, when using TOTALYTD PowerBI needs a date reference e.g. a date axis in the KPI Visual or the line chart. When I want to present the number standalone, e.g. in a Card visual it will return a blank.

I need to show the % difference between the YTD Actual and Budget value as well as previous year in a card visual so that it can be used to trigger meaningful Alerts. The page in the report is filtered to only show the current month.

My measures are:

Actual ValueYTD = 
	VAR ReturnValue =
	TOTALYTD([Actual Value];'PowerBI_Dim_DateDay'[Date])

	RETURN

	IF(MAX('PowerBI_Dim_DateDay'[Date])<=TODAY();
    	ReturnValue)

Actual Value running total in Date =
CALCULATE(
  [Actual Value];
  FILTER(ALL('PowerBI_Dim_DateDay');
   ISONORAFTER('PowerBI_Dim_DateDay'[Date]; MAX('PowerBI_Dim_DateDay'[Date]); DESC)
  )
)


The latter running total I took to avoid the date reference, but as I have two years of data in my model, it shows the YTD for both years instead of only the current year. When using ALLSELECTED it shows the actual value of the current month (as this is filtered on that page)

The first one only shows the correct value in a KPI Visual.

It goes without saying that the difference measure doees not work thus far.
Capture.PNG
Can anoyone help me?

Thanks in advance!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Re: TOTALYTD without date reference

you can add Visual level relative filter set to current month:

Capture.PNG

Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Super User II
Super User II

Re: TOTALYTD without date reference

you can add Visual level relative filter set to current month:

Capture.PNG

Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Proud to be a Datanaut!

View solution in original post

airfreighter Helper III
Helper III

Re: TOTALYTD without date reference

Thank you  @Stachu I did not think about this one.
Removing the page level filter brought back the correct number from the Running Total Measure and applying visual level filters to all the other visuals helped and solved the problem.


 

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors