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.
Hi Experts,
I am working on the below case:
Requirements : We have to sum all rows with the same account names but different Offer Types , if the sum of the forecast value is >500K then it is Key Account "Yes" else Key Account "No"
for example :
Account | Offertype | forecast | key accounts |
AAA | Q | 2334 | |
BBB | Q | 34556 | |
CCC | A | 675454 | |
AAA | A | 499523 | |
DDD | Q | 65454 | |
BBB | A | 9453 |
Row 1 : Account name is AAA, Offer type is Q and Forecast value is 2334
Row 4 : Account name is AAA , Offer type is A and Forecast value is 499523 then the sum of the AAA is >500K then it is "Yes". if row 1 & row 2 has less than 500K forecast value then it is "No"
Same logic for row 2 & 6 , I need to add this calculated column "Key Accounts" into page filter pane and select Yes or No in different bookmarks. So the account name should be unique with summing forecast values when it publishing in the table visual (no duplicate account names displaying)
Please help to achieve this asap
Thanks
DK
Solved! Go to Solution.
Hi @dinesharivalaga ,
I create a table as you mentioned.
Then I create a measure and here is the DAX code.
Column =
VAR _AccountSum =
CALCULATE(
SUM('Table'[Forecast]),
ALLEXCEPT('Table', 'Table'[Account])
)
RETURN
IF(_AccountSum > 50000, "Yes", "No")
So I think you can use a slicer and create a new table.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @dinesharivalaga ,
I create a table as you mentioned.
Then I create a measure and here is the DAX code.
Column =
VAR _AccountSum =
CALCULATE(
SUM('Table'[Forecast]),
ALLEXCEPT('Table', 'Table'[Account])
)
RETURN
IF(_AccountSum > 50000, "Yes", "No")
So I think you can use a slicer and create a new table.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@dinesharivalaga First create a new calculated column
Total Forecast =
CALCULATE(
SUM('Table'[forecast]),
ALLEXCEPT('Table', 'Table'[Account])
)
Then create one more calculated column to determine if the account is a Key Account based on the total forecast value:
Key Account =
IF('Table'[Total Forecast] > 500000, "Yes", "No")
Remove duplicate account names by creating a summarized table.
SummaryTable =
SUMMARIZE(
'Table',
'Table'[Account],
"Total Forecast", SUM('Table'[forecast]),
"Key Account", IF(SUM('Table'[forecast]) > 500000, "Yes", "No")
)
Create a relationship between the original table and the summarized table if necessary.
Add the Key Account column to the filter pane. You can now use this column to filter your data based on whether the account is a Key Account or not.
Create bookmarks to save different views (Yes or No) and use them as needed.
Proud to be a Super User! |
|
@bhanu_gautam Thanks for your solution 🙂
I have tried to use the above solution , but I am already having a Total FY Forecast measure to use "
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |