Forum Discussion

calloni's avatar
calloni
Icon for Helper I rankHelper I
2 years ago
Solved

DAX QTD not working (empty)

Hello

 

I used Bravo to generate some Time Intelligence metrics in Power BI DAX and it has worked great.

 

However when year changed to 2024 some calculations stopped working. I would like to focus on this:

 

QTD total_downloads =
IF (
    [_ShowValueForDates],
    CALCULATE (
        [total downloads],
        DATESQTD ( 'Calendar'[Date] )
    )
)
 
That one gives me blank. However a very similar YTD calculation does work:
 
YTD total_downloads =
IF (
    [_ShowValueForDates],
    CALCULATE (
        [total downloads],
        DATESYTD ( 'Calendar'[Date] )
    )
)
 
The data model basically has a Measures Table with [total downloads] which is the result of a very simple 
 
total downloads  = CALCULATE(SUM(DOWNLOADS[downloads]))
 
The DOWNLOADS table has a one to many relationship to the Calendar table.
 
What am I missing here?

Thanks in advance
Rodrigo

6 Replies

  • VijayP's avatar
    VijayP
    Icon for Community Champion rankCommunity Champion

    calloni 

    In first place you need not use Total Downloads with Calculate , Simple Sum(Downloads) willl work

    On QTD which quarter you are looking and whether primary data avaialble in that period.

    • calloni's avatar
      calloni
      Icon for Helper I rankHelper I

      Hello Thanks for your message

       

      I created a Measures Table and opted to put all calculations there so I can go in one place to see all measures. This data model is very complex, but thanks for your suggestion.

       

      I am looking to get the total downloads for the current quarter (Q1 2024). YTD works fine, but QTD doesn't (from the calculations I got from Bravo).

       

      Thanks

      Rodrigo

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    calloni I would avoid the TI functions entirely. DAX TI functions are an utter abomination and anyone/anything that suggests using them is off base. You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

    Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

    https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008

     

    • calloni's avatar
      calloni
      Icon for Helper I rankHelper I

      Thanks for the candid reply Greg.

       

      I am coming from a Tableau world where all this is pretty straight forward and the learning curve is pretty deep. That's why I had some friends recommending using Bravo for Time Intelligence and was really helpful until I saw this problem.

       

      I will take a look at your video and see if I can learn anything as DAX is really a language more devoted to programmers than to folks from human related areas like myself. I have SQL experience and worked with data for a while, Tableau was a liberation for me, but the move to PBI DAX is really combersome.

       

      Rodrigo