Forum Discussion

pmadam's avatar
pmadam
Helper II
4 years ago

DAX Help

Hi Team,

 

I have a total measure MaxYTDDays  which calculates total days in year. But i am trying to create dynamic measure so that it gives total days of selected months only from Year Month column

 

Year-Month = CONCATENATE(CA[PC Year], CONCATENATE( "-", CA[PC Month]))

 

 

 

 

 

 

 

 

 

 

 

My current measure.

 

MaxYTDDays = Max('VQR NDC'[YTDDays])
 
And  YTD days is calculated from below measure as we do not have unique total days in month column
 
 YTDDays = lookupvalue('Planning Calendar'[Month Days],'Planning Calendar'[Year-Month], Max('VQR NDC'[Year-Month]))
 
Please help!
 
Thanks,
Prathy
 
 
 
 
 

2 Replies

  • pmadam  Hi!

    Could you paste the data on which to calculate the measure and the expected result?

     

    Thx,

    B.

  • If you're using a calendar table date dimension properly, then you make the selection on that table and count the rows selected (1 for each day).

     

    I can't tell how things are set up in your particular situation well enough to advise something else.