Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

VAR to pick up the AXIS to add in another Calculation

Hello guys,


I'm new in the community, sorry if I make any mistake, today I need help but hopefuly I'll be able to help others soon.

Basically I build a Measure to built my % of Grand Total but I have 15 different Visuals, all use same Value (My Measure) but the Axis are different. If I apply my formula:


I wanted to be able to say something like 

Var Axis Name = Measure to Capture Axis
DIVIDE ( COUNT (Table[ Axis Name ]), CALCULATE( COUNT( Table[ Axis Name ], ALLSELECTED( Table[ Axis Name ] ) ) ),



If it's possible, would save me a big mess with measures and also learn more about DAX. Otherwise I'll need to change the Table[A] to Table[B] then Table[C] ...D...G...Z..

Thank you!

Super User
Super User


I think you are looking for dynamic axis solution :

Did I answer your question? Mark my post as a solution! and hit thumbs up

Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Frequent Visitor


That was a very interesting way too but, in case I already have the visual as part of my dashboard also approved by the company and stuffs. 

In that case I want to be able to use the same formula in all the different Visuals just using this way to use the Axis names as the Main one to define what they will look for to make the calculation. 

Hope it make some sense, I really don't like to bother ppl, but I'm quite stuck on it.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.