calculation with condition and filter

0 votes
How to calculate the % sales of filtered over all data whose avg sales for all years is greater than a constant.
May 2 in Power BI by Preethi
13 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Hi Preethi,

Follow the below steps:

1. Create a measure to calculate total sales without affecting the filter

total sales = CALCULATE(SUM(Orders[Sales]),ALL(Orders))

2. Create a measure to calculate the % of sales vs total for that avg more than constant using below expression-

Column = CALCULATE(DIVIDE(SUM(Orders[Sales]),[total sales]),FILTER(Orders,AVERAGE(Orders[Sales])>2000))

Hope it helps you.
answered May 2 by CHERUKURI
• 12,780 points

Related Questions In Power BI

0 votes
1 answer

What options do I have for viewing and working with data on premises

There are three ways to achieve the ...READ MORE

answered Oct 15, 2018 in Power BI by Hannah
• 14,080 points
15 views
0 votes
2 answers

Passing parameters to Power BI filter programmatically

In addition to @Kalgi's answer, there's another ...READ MORE

answered Sep 19, 2018 in Power BI by Nilesh
• 6,900 points
1,204 views
0 votes
1 answer

Fill circle with JS image

In SVG, you need to define the ...READ MORE

answered Sep 21, 2018 in Power BI by Kalgi
• 35,720 points
21 views
0 votes
1 answer

Looking for a way to to list all cloud services with their description

A jQuery selector like this should do ...READ MORE

answered Sep 21, 2018 in Power BI by Kalgi
• 35,720 points
6 views
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,040 points
48 views
0 votes
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 21, 2018 in Power BI by nirvana
• 3,040 points
337 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 14,080 points
53 views
0 votes
1 answer

Connect power bi desktop to dataset and create custom reports

Yes using Power BI REST API to ...READ MORE

answered Sep 18, 2018 in Power BI by Kalgi
• 35,720 points
47 views
0 votes
1 answer

Calculate and filter function - DAX

Hi Praneeth, Calculate () by default perform calculations ...READ MORE

answered May 2 in Power BI by CHERUKURI
• 12,780 points
11 views
0 votes
1 answer

How to replace null values with custom values in Power BI(power query editor)?

Hi Nithin, To fill or replace the null or ...READ MORE

answered Mar 8 in Power BI by CHERUKURI
• 12,780 points
260 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.