Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello all,
I would want to display top 10 values while retaining the percentage to be calculated over 365 and not over the total of top 10. Hope I am able to convey my query and can get a resolution from this community.
Solved! Go to Solution.
Hi @Anonymous ,
If you want to show Total by all table when you using TopN function in your visual, you can try HASONEVALUE function and IF to create a measure.
My Sample:
Measures:
M_Value =
IF (
HASONEVALUE ( 'Table'[Origin] ),
CALCULATE ( SUM ( 'Table'[Value] ) ),
CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
)Percentage% =
VAR _VALUE =
CALCULATE ( SUM ( 'Table'[Value] ) )
VAR _TOTAL =
CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
RETURN
IF ( HASONEVALUE ( 'Table'[Origin] ), DIVIDE ( _VALUE, _TOTAL ), 1 )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
If you want to show Total by all table when you using TopN function in your visual, you can try HASONEVALUE function and IF to create a measure.
My Sample:
Measures:
M_Value =
IF (
HASONEVALUE ( 'Table'[Origin] ),
CALCULATE ( SUM ( 'Table'[Value] ) ),
CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
)Percentage% =
VAR _VALUE =
CALCULATE ( SUM ( 'Table'[Value] ) )
VAR _TOTAL =
CALCULATE ( SUM ( 'Table'[Value] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )
RETURN
IF ( HASONEVALUE ( 'Table'[Origin] ), DIVIDE ( _VALUE, _TOTAL ), 1 )
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
Thankyou for your solution.
I tried your approach. But , below is my output.
I modified the formula as below:
Hi @Anonymous ,
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!