Forum Discussion

michaelu1's avatar
michaelu1
Advocate II
3 years ago
Solved

Help with Switch measure

Hi,

 

I'm trying to write a switch measure to look at my income statment names and swap in either the totals for those lines or subtotal measures that I created, however, the subtotals aren't working.

 

Here you can see that CurrentItem is correctly identifiying all the lines:

 

Here you can see how it skips the subtotal when I run the result:

And here you can see what just the income looks like:

  

The Income measure essentially adds up the 3 lines shown to get a total, (If I put it in a card I get 514) however, I'm at a loss why its not putting that total on the Total Income line when I run the result.

 

Thank you!

  • For those interested, I figured out the solution.

     

    Since the template was mapped to my main mapping table, PBI automatically filtered my template based off its relationship to the main mapping table.

     

    As soon as I deleted that relationship, converting the template to a disconnected table, the switch measure worked perfectly. [Since the switch measure was only looking for specfic wording there was no need to relate it to the main map.]

3 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    how is your data strutured in the table?  can you screenshot your model?  If you able to share your pbix that would be best. 

    • michaelu1's avatar
      michaelu1
      Advocate II

      Here is the structure.

       

      The template table maps to Mapping which includes every one of our account numbers and classifies them to the different catagories.

       

       I currently do not have a pbix file that I can share 😞

       

  • For those interested, I figured out the solution.

     

    Since the template was mapped to my main mapping table, PBI automatically filtered my template based off its relationship to the main mapping table.

     

    As soon as I deleted that relationship, converting the template to a disconnected table, the switch measure worked perfectly. [Since the switch measure was only looking for specfic wording there was no need to relate it to the main map.]