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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

KPI Visual showing incorrect % distance from goal

Hi all,

 

Having an issue with the KPI visual which only seems to occur when dealing with larger % changes. Otherwise it works fine the rest of the time.

 

I have a case where:

 

Indicator = A measure that returns the value 29

Trend Axis = A calendar date from date table

Target Goal = A measure that returns the value 1,101.

 

This is a 3696.55% change, however the visual is showing: +1,072, +97%

 

If I change the measures around it show's correctly, but this is not how I want it to show ( I am showing the target value as the indicator)

DAX for measures:
Indicator: 

# Sales Last Week Last Year = CALCULATE(SUM(SalesValue),DATESBETWEEN(DIM_DATE[CALENDAR_DATE],[Start of Last Week LY],[Start of This Week LY]-1))
 
# Sales Last Week  = CALCULATE(SUM(SalesValue),DATESBETWEEN(DIM_DATE[CALENDAR_DATE],[Start of Last Week],[Start of This Week]-1))
 
Hoping this will be enough info but let me know if you want me to put a pbix together.
 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , what are you doing

Divide([Target Goal] - [Indicator] ,[Target Goal])

 

Divide([Target Goal] - [Indicator] ,[Indicator] )

 

seem like you are doing for first and looking for second one 

 

For WOW , refer how week rank can help

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8

 

new columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format

 

measures
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Last year Week= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , what are you doing

Divide([Target Goal] - [Indicator] ,[Target Goal])

 

Divide([Target Goal] - [Indicator] ,[Indicator] )

 

seem like you are doing for first and looking for second one 

 

For WOW , refer how week rank can help

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8

 

new columns
Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)
Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)
OR
Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format

 

measures
This Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Last year Week= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))

Anonymous
Not applicable

Thanks Amit, the way you have explained it makes more sense to me now. 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.