Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

any way to change Type depending on condition

Hi, 

 

Attached is a simple test spreadsheet. One of columns is called "Type" which consists of Wastage, Quarantine and Rework. 

dogbural_2-1658905053955.png  

dogbural_4-1658905145106.png

 

On some occasions, although type is selected as Wastage, it occurs hours to spend for rework.

Since I need to populate data under different TYPE's but at the same time I need to capture rework hours, I put both information in a single line. 

 

With this raw data, I have separated Total amount into Wastage, Quaratnine and Rework as below.

 

Total Sum of Quarantine = calculate(sum(Testing[sum]), Testing[Type] = "Quarantine"
Total Sum of Rework = calculate(sum(Testing[Rework Cost]) )
Total Sum of Wastage = calculate(sum(Testing[sum]), Testing[Type] = "Wastage")
 
With above, I plotted graphs as below
dogbural_0-1658904973050.png

When I clicked a pie graph, bar graphs are not responded. 

 dogbural_3-1658905108885.png


Is there anyway to re-establish Type with condition where Rework cost" is Not zero, its cost belongs to Rework type. 

 

 

 
 
1 ACCEPTED SOLUTION

Hi, @Anonymous 

Have you tried to apply ’Testing[Date].[Month]‘ to the ’Details‘ field of pie chart?

You can also try the following steps to modify your original model in power query.

1.duplicate a table ’testing2‘ ->remove column'Type',column 'Sum'

veasonfmsft_3-1659337935530.png

2. Unpivot the "Rework Cost" column,then rename the new column "Attribute" to "Type" and the new column "Value" to "Sum"

veasonfmsft_4-1659338138121.png

3. Duplicate a new table 'testing3' ->remove column 'Rework Cost'

4. Apend table ’testing3‘ with table 'testing2' to create a new table 'Append1'

veasonfmsft_5-1659338338610.png

5.In the new model, apply the field 'Type' to the 'legend, you don't need to create additional measures.

veasonfmsft_6-1659338700784.png

Best Regards,
Community Support Team _ Eason\

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@amitchandak is there any way to do so? Or should i do something in power query, making a new row under condition where rework house is not blank, create a new row with Type set to Rework?

Hi, @Anonymous 

Have you tried to apply ’Testing[Date].[Month]‘ to the ’Details‘ field of pie chart?

You can also try the following steps to modify your original model in power query.

1.duplicate a table ’testing2‘ ->remove column'Type',column 'Sum'

veasonfmsft_3-1659337935530.png

2. Unpivot the "Rework Cost" column,then rename the new column "Attribute" to "Type" and the new column "Value" to "Sum"

veasonfmsft_4-1659338138121.png

3. Duplicate a new table 'testing3' ->remove column 'Rework Cost'

4. Apend table ’testing3‘ with table 'testing2' to create a new table 'Append1'

veasonfmsft_5-1659338338610.png

5.In the new model, apply the field 'Type' to the 'legend, you don't need to create additional measures.

veasonfmsft_6-1659338700784.png

Best Regards,
Community Support Team _ Eason\

Anonymous
Not applicable

Thank you @v-easonf-msft 

amitchandak
Super User
Super User

@Anonymous , Because the pie is using only measures. Only dimension values(common - Non summarized), can filter the visuals (interact)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.