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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

keeping fixed values

i need to find the percentage diffrence between No_Visit and Completed_Visits as (completed visits / total No_visits). No_visit is total of year 2020 and it shoulld be fixed. completed visit should be change according to date slicer. (example :  for 01/01/2020 to 01/31/2020  percentage diffrence = 1224/12200,  for 01/01/2020 to 12/31/2020 - percentage diff = 150226/12200. i need to keep the total value of no_visit to be fixed for the particlar year alone,the value  should not change while using date slicer, only completed visit should change according to date range Capture 1.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

Regarding this post, did you get the results you wanted? If so, could you please mark the helpful post as Answered? This will also help others in the community if they are having the same problem as you. Thank you.

Best Regards

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous ,

I created a sample pbix file(see attachment), please check whether that is what you want. You can create a measure as below:

percentage diffrence = 
VAR _nvisits =
    CALCULATE ( SUM ( 'Table'[No_Visit] ), ALL ( 'Table' ) )
VAR _cvisits =
    CALCULATE ( SUM ( 'Table'[Completed visit] ) )
RETURN
    DIVIDE ( _cvisits, _nvisits, 0 )

yingyinr_0-1640071592490.png

yingyinr_1-1640071695559.png

 

Best Regards

Anonymous
Not applicable

thank you

Anonymous
Not applicable

Hi @Anonymous,

Regarding this post, did you get the results you wanted? If so, could you please mark the helpful post as Answered? This will also help others in the community if they are having the same problem as you. Thank you.

Best Regards

amitchandak
Super User
Super User

@Anonymous , with help from date table complete year value

 

This Year = CALCULATE(sum('Table'[No_visit]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))

 

This year Sales = CALCULATE(sum('Table'[No_visit]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))

 

Force only 2020

This Year = CALCULATE(sum('Table'[No_visit]),filter(ALL('Date'),'Date'[Year]=2020 ))

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

im getting the value as infinity 

@Anonymous , what formula you have used and what you got in denominator

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors