Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

How to display text dynamically in Power BI

Hi All,

I need help in displaying text of a column dynamically.

In the below table, I have a column called "Carrier Name", which holds data in text format. Below table brings data of all the time periods. Other subsequent fields also hold values, like Load Count, Total Spend, etc.

 

 

Now, I have a similar table created for various time periods like Month To Date, Quarter To Date, Year To Date, etc. As seen in the below screenshot, while the data of the other fields/ measures are 0, however all the Carrier Names are being displayed. I would like to display only those Carrier Names which have data populated in them, i.e. 'Load Count' <> 0. Can someone please help me in explaining how can I achieve this? 

 

 

Thanks in advance.

Best Regards.

5 Replies

  • Anonymous , By default that should be the behavior. Have you added +0 to any measure. Or used option- Show item with No Data?

    You can add a visual level filter [Load **bleep**] <> 0

     

    Uncheck

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak, thanks for reverting. The filter for "Show items with no data" was always unchecked. The visual level filter does help, however I was looking for some DAX Code here. Also, yes I have displayed (Blank) as 0 for the field "Load Count", as I have a Card visual created for this field too, where I would like to display "Blank" as "0". Hence, was searching for an option where I don't have to use visual filter nor have to revert the code for Load Count from 0 to Blank. Can you please help here?

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous , Have a measure 

        if( [Load Count] =0 , blank(),[Load Count])

  • Watsky's avatar
    Watsky
    Icon for Solution Sage rankSolution Sage

    Hey Anonymous , is there a reason why you can't filter Load Count <> 0? If you can't filter on Load Count are you trying to keep the numerical values displaying but have the Carrier Name show blank?

     


    Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up! ?
    Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Watsky, I am looking out for some DAX Code that can help me filtering the values and avoid using visual level filter. The final display that I would like to have is as can be seen below, however without using visual filter.