Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

DAX Help

I am using a Line Chart in my dashboard.  the ideal behavior would be show the visualization as "Blank" unless the user has selected the a specific Campaign Name in the slicer.

 

I am unsure how to create the behavior and look for help.

 

Thanks!

  • Assuming that your calculation is a measure called "My Measure", then you could do this:

     

    Measure = IF(HASONEFILTER(<columnName>),[My Measure],BLANK())

    <columnName> you would replace on the column that you want them to filter/slice on.

     

    Put this Measure in place of where you currently have your "My Measure" in your line chart visualization (Values area most likely)

8 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Generally you handle this with a measure in the format:

     

    Measure = IF(HASONEFILTER(<columnName>),<calculation>,BLANK())
    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler

       

      In this case, the output in the Line Graph is already a calculation I have created.  Does this impact the solution?

       

      Also, can you be a little more explicit in how and where this "new" measure is applied?

       

      Thanks.

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        Assuming that your calculation is a measure called "My Measure", then you could do this:

         

        Measure = IF(HASONEFILTER(<columnName>),[My Measure],BLANK())

        <columnName> you would replace on the column that you want them to filter/slice on.

         

        Put this Measure in place of where you currently have your "My Measure" in your line chart visualization (Values area most likely)