Forum Discussion

Mmench's avatar
Mmench
Regular Visitor
2 years ago
Solved

Conditional Color based on COUNT for Guage Visual and multiple tables

I'm trying to show a visual of authorized position for multiple locations vs actual. 

 

RESULTS: RED gradient for 'under manned' and GREEN gradient for 'overmanned' and WHITE if authorized equals manned.

 

Table1: all manning data every name, their job, location, etc (a living document)

Columns: [NAME], [LOCATION], [JOBTITLE], etc


Table2: a set document (that a director might change later based on needs) showing location, jobtitle authorized and paygrade this table includes every one of the 20 job authorizations at each of the locations.  So, I might have a total entry of 16 jobcode 3X3A across all locations, but 5 here and 3 there, etc. 

Columns: [LOCATION], [JOBTITLE], [PAYGRADE]

 

Current page setup is a slicer to filter by location and 20 GUAGE visuals (newCard would also work if easier) that are each filtered by a COUNT of each of the twenty Table1 and Table2[JOBTITLE] jobs... 3X3A, 3X3B, etc. This gives me two numbers to play with... Authorized and Assigned.


I think the tables are linked right as I get the correct results, but...

 

I'd love to have the visual show RED gradient if Assigned is less than Authorized, WHITE if equal, and GREEN gradient if overmanned.

 

I've dabbled in DAX, but don't know enough to figure this out from slightly related examples.  I've tried creating a new column that would do the count AND show me the difference between authorized and assigned... I'm just kinda stuck looking at a nice page I've created that is just all one color BLUE.

 

Any thoughts?? 

thx, -mm

 

  • ANSWERED

     

    Create a NewMeasure to find the difference and then use THAT as the field to base conditional formatting.

     

    -mm

6 Replies

  • Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

    Do not include sensitive information or anything not related to the issue or question.

    If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216

    Please show the expected outcome based on the sample data you provided.

    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

    • Mmench's avatar
      Mmench
      Regular Visitor

      Thanks...  hopefully this works.

      I've only listed a few of the jobs on the page with all the gauges, so some of the locations will be blank.

       

      Again, instead of BLUR I'd love to see RED for Assigned less than Authorized, White for equal to, and GREEN for Assigned greater than Authorized. If there was a way to make it a gradient based on % that would be super!


      also... Any visual is ok if it works.  I've used NewCards instead of guage here, too.

      let me know if this doesn't work.  Thanks again. -mm

      • lbendlin's avatar
        lbendlin
        Super User

        Your data model is not in a usable shape

         

        which table is the dimension and which is the fact? You may need to have additional dimensions like Location.

         

  • Mmench's avatar
    Mmench
    Regular Visitor

    ANSWERED

     

    Create a NewMeasure to find the difference and then use THAT as the field to base conditional formatting.

     

    -mm