cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
darko861
Helper II
Helper II

Get Average in a measure by using a filter

Hi Community,

I have a table visual that has two measures called Rev per hour 1 and Rev per hour 2. As seen below in the last line of the table it gives a total average of 1018 for Rev_per_hour 1 and 1265 for Rev_per_hour_2. But I also have a filter applied to this table visual, Rev_per_hour 2 is not blank, which reduces the number of customers, and changes the outcome.

 

I have also created a multiple card using the same measures Rev_per_hour 1 and Rev_per_hour 2, unfortunately, you cannot filter the card on Rev_per_hour 2 to get the same result as you did in the table visual.

 

If you don't use the filter on Rev_per_hour 2, then both the card visual and the table visual would have the same result.

 

Is there a way to change both measures so that you can add a filter inside both measures where it says Rev_per_hour 2 is not blank?

 

Here are both measures:

rev_per_hour1 = DIVIDE([xxxrev1],[xxxrev1.0],BLANK())
rev_per_hour2 = DIVIDE([xxxrev2],[xxxrev1.0],BLANK())
 
darko861_0-1631466371536.png

 


 


 

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @darko86

 

Have you tried creating two cards one for each measure and then make the filter on the correct visual?

 

If that is not a solution 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.

 

If this is not possible you need to make a new measure that 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @darko86

 

Have you tried creating two cards one for each measure and then make the filter on the correct visual?

 

If that is not a solution 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.

 

If this is not possible you need to make a new measure that 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Hi,

 

I have tried creating two cards one for each measure, unfortunately, it doesn't work.

Yes, a measure needs to be created where it says Rev_per_hour 2 is not blank? Can you create a measure that will give me the desired result and will match the table visual, if so how can I write this measure?

 

Here is a sample file:

https://www.dropbox.com/s/avku655e9ocn8h9/xxx-%20Test%20-%202%20-%20Copy.pbix?dl=0

 

Helpful resources

Announcements
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.