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
darko861
Resolver II
Resolver 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



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