Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Link0111
New Member

Percentage KPI Configuration

First of all, Hello everyone! My name is Nicolas and I'm new to this forum, I'm hopping to be an active member of this community and also be helped in my very unique Power BI Problems!

 

So let's cut to the chase... My problem is that I'm creating an inform with a table in which I offering a view of sales in a  weekly and monthly segmentation but my percentage indicator of YoY% only work with a date segmentation filter. The thing is that I'm using a column in my data table which have a formula with IF's and MAX's to mark only the dates I want to show in my inform without the need of changing the filters. For this table I'm not using any relations at all and the only filter I'm using is that column composed of 1's and 0's. 

 

Is there any way to make that indicator without making my report dependent on date filters?

 

This is the code of the indicator:

 

 

YoY% of Sales = 
IF(
	ISFILTERED('PPTOzv'[Sales]),
	ERROR("FAIL"),
	VAR __PREV_YEAR = CALCULATE(SUM('PPTOzv'[Sales]), DATEADD('PPTOzv'[Date].[Date], -1, YEAR))
	RETURN
		DIVIDE(SUM('PPTOzv'[Sales]) - __PREV_YEAR, __PREV_YEAR)
)

 

 

Thank you!

 

1 REPLY 1
amitchandak
Super User
Super User

@Link0111 , always use date table and no .date. Id date has a timestamp, have another date column without a timestamp

 

 

YoY% of Sales =
IF(
ISFILTERED('PPTOzv'[Sales]),
ERROR("FAIL"),
VAR __PREV_YEAR = CALCULATE(SUM('PPTOzv'[Sales]), DATEADD('Date'[Date], -1, YEAR))
RETURN
DIVIDE(SUM('PPTOzv'[Sales]) - __PREV_YEAR, __PREV_YEAR)
)

 

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.