cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KH_Mike
Helper III
Helper III

Show the Item in visualization which not exist in Dataset

Hi All,

 

I connect to the PBI Dataset which contian the data like below. The Sub Group for Group A & B contain "Total" which equal to calculated in back end. However, for Group C, the dataset only contain Sub Goup "AA" & BB". 

 

GroupSub GroupAmount
AAA10
ABB20
ATotal25
BAA20
BBB30
BTotal35
CAA10
CBB10

 

Now, I want to show the table like below

 

GroupAmountExplain
A25Sum the Group "A" & Sub Group "Total"
B35Sum the Group "B" & Sub Group "Total"
CXXSum the Group "C" & Sub Group "AA" & Sum the Group "C" & Sub Group "BB" * 0.8

 

Is it possible to acheive it DAX formula instead of amendming the Dataset?

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @KH_Mike ,

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
SUMMARIZE('Table','Table'[Group],
"Amount",
SWITCH(
TRUE(),
'Table'[Group]="A",CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Group]="A"&&'Table'[Sub Group]="Total")),
'Table'[Group]="B",CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Group]="B"&&'Table'[Sub Group]="Total")),
'Table'[Group]="C",CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Group]="C"&&'Table'[Sub Group] in {"AA","BB"}))*0.8))

2. Result:

vyangliumsft_0-1627263714304.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @KH_Mike ,

Here are the steps you can follow:

1. Create calculated table.

Table 2 =
SUMMARIZE('Table','Table'[Group],
"Amount",
SWITCH(
TRUE(),
'Table'[Group]="A",CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Group]="A"&&'Table'[Sub Group]="Total")),
'Table'[Group]="B",CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Group]="B"&&'Table'[Sub Group]="Total")),
'Table'[Group]="C",CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),'Table'[Group]="C"&&'Table'[Sub Group] in {"AA","BB"}))*0.8))

2. Result:

vyangliumsft_0-1627263714304.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

KH_Mike
Helper III
Helper III

Anyone know how to handle this case?

Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power BI Dev Camp Session 27

Ted's Dev Camp

This session walks through creating a new Azure AD B2C tenant and configuring it with user flows and custom policies.