Forum Discussion
URGENT - dax function not working
Hi, xiumi_hou
Oh... before or on the 1st day of the selected month??
Or is it before the 1st day?
I hope you can change as you wish.
please include ALLSELECTED function inside the measure.
Activation before =
CALCULATE (
DISTINCTCOUNT ( f_calls[Parent_id] ),
FILTER (
ALLSELECTED ( f_calls ),
f_calls[f_Cases.Activation_date_c] <= MIN ( d_date[Date] )
),
USERELATIONSHIP ( f_calls[f_Cases.Activation_date_c], d_date[Date] )
)
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Thanks for the reply. This still show results blank. Can you please help me take a look at the below query?
- Jihwan_Kim5 years agoSuper User
Hi,
I am not sure, but perhaps, it has something to do with the context.
Please let me have a look at your sample pbix file. Then I can try to create more accurate measures.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
- xiumi_hou5 years agoPost Partisan
Thanks Jihwan, I have described it as below as attahced a sample dataset, can you please help me and take a look?
- Jihwan_Kim5 years agoSuper User
Hi, xiumi_hou
Thank you for your message.
In this case, I think the approach has to be made in a little bit different way.
I can write based on this case only. My measure might not be appropriate if there are any other related tables to this case.
- do not activate any relationships between date-table and case-table. All relationships have to be inactive.
Please check the below if I correctly understand your request, and please let me know.
Active Clients Count =COUNTROWS(CALCULATETABLE('Cases', FILTER( 'Cases','Cases'[Activation Date] <= MAX(dates[Date]) && 'Cases'[Closed Date] >= MIN( dates[Date]) && 'Cases'[Activation Date] <> BLANK())))+COUNTROWS( CALCULATETABLE('Cases', FILTER( 'Cases','Cases'[Activation Date] <= MAX(dates[Date] )&& 'Cases'[Closed Date] =BLANK() && 'Cases'[Activation Date] <> BLANK())))Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!