cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dsandip59 Member
Member

how to create a Pivot table based on the selected values from another table? - Please help

Hi,

I have created a demo app and attaching the link. I want that when I select the customer ID from table1, it will show realted data in below 2nd pivot table. For this I have created a Pivot table with column name and Values. But it does not work.

https://drive.google.com/file/d/1Qk8mfDfUBINNUC2S0FHbgGb8JJmInFv5/view?usp=sharing

 

So please help me how to achive this functionality?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: how to create a Pivot table based on the selected values from another table? - Please help

hi, @dsandip59 

No, that is just a formula in Calculated Pivot table expression.

In simple terms, this expression is a "calculate column formula" not a "calculate measure formula" for current context of the formula that is used to create a calculate table. 

 

Note: calculate column and calculate table can't be affected by any slicer.

 

Best Regards,

Lin

Community Support Team _ Lin
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

3 REPLIES 3
Community Support Team
Community Support Team

Re: how to create a Pivot table based on the selected values from another table? - Please help

hi, @dsandip59 

First, you should know that calculate column and calculate table can't be affected by any slicer
Notice:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result.
here is reference:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

Second, for measure is an aggregate value, and what you want is a pivot table, you may try this way:

Step1:

In Edit Queries, Duplicate the order table, and for duplicate table remove all the columns expect(Row ID, Customer ID, Product ID) like below:

2.JPG

Step2:

Select Customer ID, Product ID then unpovit them.

Step3:

Close& Apply and then create a relationship between oders and duplicate table by Row ID column

3.JPG

Step4:

Now, drag duplicate table Attribute and Value into a table visual.

4.JPG

 

 

here is pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
dsandip59 Member
Member

Re: how to create a Pivot table based on the selected values from another table? - Please help

Hi,

Can I use measure in Calculated Pivot table?means if I have created a measure and used it in a Calculated Pivot table like below?

Pivot Table = UNION(
SELECTCOLUMNS (
Data,
"Column Name", "Alert Category",
"Values", Data[Alert Cat measure]
),
SELECTCOLUMNS (
Data,
"Column Name", "File ID",
"Values", Data[FILE_ID_SELECTED]
)
)
 
Community Support Team
Community Support Team

Re: how to create a Pivot table based on the selected values from another table? - Please help

hi, @dsandip59 

No, that is just a formula in Calculated Pivot table expression.

In simple terms, this expression is a "calculate column formula" not a "calculate measure formula" for current context of the formula that is used to create a calculate table. 

 

Note: calculate column and calculate table can't be affected by any slicer.

 

Best Regards,

Lin

Community Support Team _ Lin
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

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 310 members 3,293 guests
Please welcome our newest community members: