Forum Discussion
DAX help Re: calculated measure
- 10 years ago
Hi Rynoh17,
I usually will leverage a calculated column in this case and build a associated measure.
Sum of Extended = IF([Sales Amount]>100,1,0)
Count of Customers = CALCULATE(DISTINCTCOUNT('Power BI'[Customer ID]),FILTER('Power BI','Power BI'[Sum of Extended]=1))
Applying your different filter contexts should show at which branch your customers who meet that extend sales requirement fall.
Within the table/matrix you can also leverage conditional color formatting within the values tab to enforce color threshholds.
I hope this helps.
Sorry for lack of clarity..
I have multiple parts per customer with extended sales at a certain price point, some positive and others negative. What I would like to do is sum the total extended sales per customer (sumifs in excel) and count it as 1 if it is a positive result and nothing if it is a negative result.
From here I want to count the customers with a 1, per level (EVP, RVP, DM, Branch). Say there are three customers to a branch with positive extended sales. In a table or matrix form, I would want that branch value to read 3, (the sum of all three 1s). At the RVP level, I would want the count of all the positive extended values from the customers underneath it.
Does this help?
so to chip away at this ; step one is to establish:
sum the total extended sales per customer
do you have this much done? - if not a snippet of the table sample would help
once that is established then one would Count Rows with a Filter of only positive values
As per my first post - depending on your hierarchy (sum by Region, VP, etc) the Visuals should auto aggregate up/down...if they are related appropriately either all in the same table or joined from separate tables...