Forum Discussion

bdehning's avatar
bdehning
Icon for Post Prodigy rankPost Prodigy
2 years ago

Not seeing 0 Count Months

I have this measure as my Y Axis, but it does not show the 0 months on my chart visual as expected?

 

Test Count of Total Gross Incurred +0 =
  VAR __Max = MAX('CalendarTable'[Dates])
  VAR __Count = COUNT(LossRun[Total Gross Incurred]) + 0
  VAR __RT = COUNTROWS(FILTER(ALL('LossRun'), [InceptionYear] <= __Max))
  VAR __Result = IF(__RT = 0, BLANK(), __Count)
RETURN
  __Result

 

What I am missing to get 0 months to show?

6 Replies

  • bdehning 

    Try this measure:

    Test Count of Total Gross Incurred +0 =
      VAR __Max = MAX('CalendarTable'[Dates])
      VAR __Count = COUNT(LossRun[Total Gross Incurred]) + 0
      VAR __RT = COUNTROWS(FILTER(ALL('LossRun'), [InceptionYear] <= __Max))
      VAR __Result = IF(__RT == 0, BLANK(), __Count)
    RETURN
      __Result


    Or right click on the column assinged to the X-Axis and Choose "Show Item with no Data"

    • bdehning's avatar
      bdehning
      Icon for Post Prodigy rankPost Prodigy

      Well, with your measure I get 0's again, but also 0's for months prior to InceptionYear, which I do not want.    I do not want to see 0's if prior to InceptionYear.  Ideas?

       

      Both X-Axis items are text and show items with no data does nothing.   

       

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

        bdehning 

        Sharing a dummy Power BI file representing your scenario would be beneficial. You can save the Power BI file on Google Drive or any other cloud storage platform and provide the link here. Kindly ensure that permission is granted to open the file.