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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

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:

DIVIDE ( COUNT (Table[A]), CALCULATE( COUNT( Table[A], ALLSELECTED( Table[A] ) ) ),

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 ] ) ) ),

Sh00un_0-1626186441558.png

 

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!

2 REPLIES 2
Fowmy
Super User
Super User

@Anonymous 

I think you are looking for dynamic axis solution : 

https://www.youtube.com/watch?v=dYmzb5UMkXw



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

Anonymous
Not applicable

@Fowmy 

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

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors