Forum Discussion

Keza's avatar
Keza
New Member
6 years ago

Help with Conditional Statement in PowerBI

Hello, 

 

I am a newbie with PowerBi, I only know basic data visualisation so far. I would like to set/write a conditional statement (not sure if i am using the right terms) correct me if i am not please:)

 

I have two columns i want to focus on, VIN column and Base DTC column. The VIN column shows the Vehicle Identity number which is however, duplicated. The Base DTC column shows the error codes in the particular VIN. Some VINs have more than one error code hence the row duplication. I would like to create a count of the number of VINs based on the error code. eg VIN 99JCA2N0LT208770 has two error codes (seen in Base DTC column), if i select both those error codes in the slicer, I expect it to show me the number of VINs when only those two errors are in the same VIN (therefore result should be 1) but instead it gives me a row count and returns result as "2". Please help me. I am really stuck. Please see attached screenshot: 

 
 

 

Many thanks 

Keza 

4 Replies

  • Hi Keza - 

     

    Do you have a sample file you can share for this please? I'd like to know what visual you were using and if at all there is a measure created as well?

     

    Regards

    E

    • Keza's avatar
      Keza
      New Member

      Hello E,

       

      how can i attach it on here? I dont see an option..

       

      regards,

      Martha

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Keza ,

        You can upload your sample file to OneDrive for Business, then share the link with us.

        Please check if the below screen shot is your desired result? If yes, just drag the field VIN with aggregation "Count(Distinct)" onto Card visual.

        Best Regards

        Rena