Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a table UPS and a column Age
The Power BI has a slicer based on column location
I want to find Average Age from the column Age, ignoring the slicer and display the measure in the report to dispaly the average as a card, irrespective of the slection in the slicer.
The following syntax is working:
Solved! Go to Solution.
Hi @cghanta
Can you please try the below DAX.
CALCULATE(
AVERAGE(UPS[Age for Avg]),
ALL(UPS[Location]),
UPS[Age for Avg] <> 0
)
If this answers your question, kindly mark it as the solution.
Hi @cghanta
You also can try below measure:
CALCULATE(AVERAGE(UPS[Age Avg]),FILTER(ALL(UPS), UPS[Age for Dual UPS Avg] <> 0))
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Both the solutions from @xifeng_L and @mdaatifraza5556 worked, Thank you both.
I am not sure how to select both the replies as accepted solution
Both the solutions from @xifeng_L and @mdaatifraza5556 worked, Thank you both.
I am not sure how to select both the replies as accepted solution
Hi @cghanta
You also can try below measure:
CALCULATE(AVERAGE(UPS[Age Avg]),FILTER(ALL(UPS), UPS[Age for Dual UPS Avg] <> 0))
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Hi @cghanta
Can you please try the below DAX.
CALCULATE(
AVERAGE(UPS[Age for Avg]),
ALL(UPS[Location]),
UPS[Age for Avg] <> 0
)
If this answers your question, kindly mark it as the solution.
Hi @mdaatifraza5556,
I have 2 columns on a the table UPS as follows
Location | 1stServiceAge | 2ndServiceAge |
town1 | 3 | 0 |
town2 | 5 | 2 |
town3 | 6 | 0 |
town4 | 0 | 0 |
town5 | 2 | 1 |
How can I calculate (measure) the average age of both columns, ignoring 0's and slicer. For the above the answer should be 19/6 = 3.17, if all zeros, give 0
Thank you in advance
Hi @mdaatifraza5556,
I have 2 columns on a the table UPS as follows
Location | 1stServiceAge | 2ndServiceAge |
town1 | 3 | 0 |
town2 | 5 | 2 |
town3 | 6 | 0 |
town4 | 0 | 0 |
town5 | 2 | 1 |
How can I calculate (measure) the average age of both columns, ignoring 0's and slicer. For the above the answer should be 19/6 = 3.17, if all zeros, give 0
Thank you in advance
Both the solutions from @xifeng_L and @mdaatifraza5556 worked, Thank you both.
I am not sure how to select both the replies as accepted solution
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
6 |