Forum Discussion

ysherriff's avatar
ysherriff
Icon for Resolver II rankResolver II
4 years ago
Solved

Quarter to Date Function not working

Hi all, I am new to power bi so please be patient with me. 🙂
 
I am attempting to calculate QTD on a text field and this is the DAX formula used.
 
Count QTD = CALCULATE(TOTALQTD(COUNTA(Prospects[Contact ID]),DATESQTD('Date'[Date])))
 
For some reason, it is showing blank. I searched the forums and online but can't seem to find an answer to this problem would should be easy. My YTD formula works but not QTD or MTD.
 
Where am i going wrong. 
 
Thanks for your help.
  • ysherriff's avatar
    ysherriff
    4 years ago

     

    I updated the formula but it still is showing a blank. In the image below, i set up a card visual wanting to reflect only QTD but it shows blank but when I show all quarters, the data is there. What am i missing?

     

    Thank you for your help.

     

     

     

     

4 Replies

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    You don't need both functions. Either of these should work.

     

    Count QTD = CALCULATE(COUNTA(Prospects[Contact ID]),DATESQTD('Date'[Date]))

     

    Count QTD = TOTALQTD(COUNTA(Prospects[Contact ID]), 'Date'[Date])

     

    Pat

    • ysherriff's avatar
      ysherriff
      Icon for Resolver II rankResolver II

       

      I updated the formula but it still is showing a blank. In the image below, i set up a card visual wanting to reflect only QTD but it shows blank but when I show all quarters, the data is there. What am i missing?

       

      Thank you for your help.

       

       

       

       

  • mahoneypat's avatar
    mahoneypat
    Icon for Microsoft Employee rankMicrosoft Employee

    I suspect your Date table is going beyond today. Please see this documentation on the DATESQTD function.

    DATESQTD - DAX Guide

     

    If you change your Date table so that it ends at TODAY(), it should work as expected. Alternatively, you can add a Relative Date filter on the card visual with the Date[Date] column.

     

    Pat