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

How to compare Today sales Vs Last year same day in KPI Card

Hi all,

 

In my report, I am using KPI cards to compare Today Vs last year Same day, Week to date Vs Last year same time, Last 4 Vs Same last 4 weeks last year and This year sales Vs Last year sales.

 

In which, Last 4 weeks comparission, and This year Vs last year working fine.

 

But when it comes to Today Vs Same day last year sales Today vs last year same not comapringToday vs last year same not comapringGross Margin% not showing correct Distance valueGross Margin% not showing correct Distance value, It not comparing just showing today's Sales(Picture attached)

and Week to date Vs last year same priod, comparing Current week day to whole week last year, which is not helpingme.

Lastly, KPI card for Gross Margin % compares This year vs last year but in distance its show wrong calculations.

Can any one please help me solove this problem.

 

Thanks

Mazhar

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

What measure you used in KPI visual, can you please share more detailed information?(e.g. sample data, pbix file, expected result)

 

In addition, I test with below formula and it works on my side.

Measure =
AVERAGE ( 'Table'[Amount] )
    - CALCULATE ( AVERAGE ( 'Table'[Amount] ), SAMEPERIODLASTYEAR ( 'Table'[Date] ) )


3.PNG

 

Reference links:

KPI visuals (Tutorial)

DAX Time Intelligence Explained

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

What measure you used in KPI visual, can you please share more detailed information?(e.g. sample data, pbix file, expected result)

 

In addition, I test with below formula and it works on my side.

Measure =
AVERAGE ( 'Table'[Amount] )
    - CALCULATE ( AVERAGE ( 'Table'[Amount] ), SAMEPERIODLASTYEAR ( 'Table'[Date] ) )


3.PNG

 

Reference links:

KPI visuals (Tutorial)

DAX Time Intelligence Explained

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

@v-shex-msft

Thanks for your reply, Now I am able to compare Today Vs Last year same day. but my second proble in not solved still.

while comparing  Gross Margin Today 25% and Last year same day 29% diffrent should be 4% but it shows -12.38% How can I fix it?

In KPI card distance-12.38. but it should be only 4%In KPI card distance-12.38. but it should be only 4%

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.