Forum Discussion

ImprovingCL's avatar
ImprovingCL
Regular Visitor
5 years ago
Solved

Line Chart using COUNTROWS measure only returning blank

I am new to PowerBI so this is probably a novice question.  I have a very simple table that I am trying to represent on a line chart but my COUNTROWS is returning a BLANK value, which is expected, but the suggestions from other posts to add 0 to the COUNTROWS return value or using the IF and ISBLANK combination do not seem to be working for me.

 

 

I created a measure as shown below.

 

 

LabelActivites = IF(ISBLANK(COUNTROWS('Table')), 0, COUNTROWS('Table'))

 

 

 

In my chart below, my settings are:

X Axis = Date

Values = LabelActivities

Legend = Activity

As can be seen, my measure is still returning blank values instead of '0'.

 

Any help in what I am overlooking would be greatly appreciated!

 

  • Hi,

    You had not created a relationship between the tables.  You may download my PBI file from here.

    Hope this helps.

12 Replies

  • Hi ImprovingCL 

    That measure shouldn't return Blank if your table contains the rows as shown in your image.

    Have you used a Card visual to verify the value in the LabelActivities measure?

    Can you please share your PBIX file?

    Regards

    Phil

    • ImprovingCL's avatar
      ImprovingCL
      Regular Visitor

      Hi PhilipTreacy,

       

      I can see in a Card Visual that the value being returned looks correct.  I have put my PBIX file in the link below.  

       

      Shared Folder 

       

      In the PBIX, the first page contains the visual using the data I am actually trying to represent correctly, but my "Sample" table is in there as well.

       

      Thanks,

      Chris