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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Create a bar chart with number of mistakes per category

Hello everyone, 
I have a query with values fetched by a system and values validated by users. 
I have managed to indicate number of errors by line and create a flag about whether a specific category has a mistake or not but I have not managed to make a graph with all the categories in a single bar chart and see how many mistakes each category has (categories named as Flag columns). 
I have attached a sample dataset. 
I have managed to create separate bar charts, but not a unified one. 
Also, I have created a secondary query but I cannot find a way to merge it with the original one so that I can have interractions. 

This is the desired result as built via the secondary query + value replacement but I am sure there are better ways. 

akampianakis_0-1613554885838.png

this is some sample data!

YearQuarterMonthDayBatchNameBatchClassNameDates FlagsErrorsInvoice AmountInvoice Amount FlagInvoice Amount ValidatedInvoice CurrencyInvoice Currency FlagInvoice Currency ValidatedYearQuarterMonthDayYearQuarterMonthDayInvoice NumberInvoice Number FlagInvoice Number ValidatedPO NumberPO Number FlagPO Number ValidatedShip Name FlagShipnameShipname ValidatedSupplier NameSupplier Name FlagsSupplier Name Validated
2020Qtr 1January1a1OK2200OK200USDOKUSD2019Qtr 4December312019Qtr 4December31APA19170-7Not OKSCTH-110201 OK    OAKLANDNot OKAmerican supplies
2020Qtr 1January1b2OK1300OK300USDOKUSD2019Qtr 4December182019Qtr 4December188922OK8922 Blank PO Number1060523   AMEEROKAMEER
2020Qtr 1January1c3OK2729Not OK72USDOKUSD2019Qtr 4December312019Qtr 4December31733518AOK733518A OK    GCTNot OKCUBA
2020Qtr 1January1d1OK1256OK256USDOKUSD2019Qtr 4December312019Qtr 4December31733519AOK733519A OK    GCTNot OKCUBA
2020Qtr 1January1e2OK21433Not OK1456USDOKUSD2019Qtr 4December312019Qtr 4December31733521AOK733521A OK    GCTNot OKCUBA
2020Qtr 1January1f3OK2639Not OK654USDOKUSD2019Qtr 4December312019Qtr 4December31737713AOK737713A OK    TermaticsNot OKCUBA
2020Qtr 1January1g1OK2518Not OK510USDOKUSD2019Qtr 4December312019Qtr 4December31737714AOK737714A OK    TermaticsNot OKCUBA
2020Qtr 1January1h2OK11107OK1107USDOKUSD2019Qtr 4December312019Qtr 4December31737715AOK737715A OK    TermaticsNot OKCUBA
2020Qtr 1January1i3OK1254OK254EUROKEUR2019Qtr 4December302019Qtr 4December3021935328OK21935328 OK     Blank NameOnline Co
2020Qtr 1January1j1Not OK31626OK1626USDOKUSD2019Qtr 4December172019Qtr 4December31Vai8159Not OKINV818159756112OK756112Not OKAndreasKostasHoustonOKHouston
2020Qtr 1January1k2Not OK3500OK500GBPNot OKUSD2019Qtr 4December162019Qtr 4December31INV818160OKINV818160756084OK756084Not OKAndreasGeorgeHoustonOKHouston
2020Qtr 1January1l3Not OK21334OK1334EURNot OKUSD2019Qtr 4December182019Qtr 4December31INV818161OKINV818161756447OK756447OKNikiNikiHoustonOKHouston
2020Qtr 1January1m1Not OK21705OK1705USDOKUSD2019Qtr 4December232019Qtr 4December311NV818162Not OKINV818162756805OK756805OKHopeHopeHoustonOKHouston
2020Qtr 1January1n2OK11586OK1586USDOKUSD2019Qtr 4December312019Qtr 4December31567004373AOK567004373A OK    USA OOCNot OKBOSSY
2020Qtr 1January1o3OK1799OK799USDOKUSD2019Qtr 4December312019Qtr 4December31567004374AOK567004374A OK    USA OOCNot OKBOSSY
2020Qtr 1January1p1OK11049OK1049USDOKUSD2019Qtr 4December312019Qtr 4December31584013974AOK584013974A OK    USA OOCNot OKBOSSY
2020Qtr 1January1q2OK01640OK1640USDOKUSD2019Qtr 4December312019Qtr 4December31584013975AOK584013975A OK    BOSSYOKBOSSY
2020Qtr 1January1r3OK11576OK1576USDOKUSD2019Qtr 4December312019Qtr 4December31584013976AOK584013976A OK    USA OOCNot OKBOSSY
2020Qtr 1January1s1OK21900OK1900 Blank Invoice CurrencyUSD2019Qtr 4December302019Qtr 4December30236637OK236637 OK    HennesyNot OKJCV
2020Qtr 1January1t2OK2716OK716 Blank Invoice CurrencyUSD2019Qtr 4December302019Qtr 4December30240849OK240849 OK    HennesyNot OKJCV

Thanks everyone!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Found the solution, made a secondary querry with unique inputs, by combining all the columns and then pivoted. Then I did the unique column also for my original querry. 
Cleared the duplicates. 
Created 1:* relationship via the unique columns, and it worked.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Found the solution, made a secondary querry with unique inputs, by combining all the columns and then pivoted. Then I did the unique column also for my original querry. 
Cleared the duplicates. 
Created 1:* relationship via the unique columns, and it worked.

Thanks for your experience sharing and effort to this community!😁

v-robertq-msft
Community Support
Community Support

Hi, @Anonymous 

According to your description and sample picture, it seems like you have used the “Unpivot columns” function in the Power Query to create another query and created the bar chart you wanted. I can roughly understand your logic and the output you want to get. But what do you mean by “ I have created a secondary query but I cannot find a way to merge it with the original one so that I can have interactions.” What’s the detailed method of the interactions you want to have?

Would you like to post your sample pbix file(without sensitive data) and your expected result(like the chart you want to get and the correct measure value based on your sample data) so that I can help you in advance?

Thanks very much!

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

Anonymous
Not applicable

Test FIle 

I am attaching a test file , I think you'll understand what I am trying to do here.!
Thank you for your help!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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