Forum Discussion
DAX query with page level slicer
Hello,
I'm fairly new to DAX querying and have a question from the business about using a page level slicer within a DAX query, instead of a hard coaded value.
Below is what I'm trying to accomplish:
Original code:
No. of Activities = COUNTAX(
FILTER(
RELATEDTABLE('Customer Events'),
'Customer Events'[Activity Type] = "Complete Purchase"
),
'Customer Events'[Activity Type Count]
) + 0
Modified code:
No. of Activities = COUNTAX(
FILTER(
RELATEDTABLE('Customer Events'),
'Customer Events'[Activity Type] = 'Customer Events'[Activity Type Cnt]
),
'Customer Events'[Activity Type Count]
) + 0What I'm trying to do is show the number of repeat purchase activity by count.
Any information you can provide me with would be much appreciated.
Thank you
3 Replies
- v-jiascu-msftMicrosoft Employee
Hi Anonymous,
Can you share the file? A dummy one is enough. We won't know what the formulas are going to do without data.
How can we check if they are repeat purchase activity?
Best Regards,
Dale
- AnonymousNot applicable
Hello Dale,
I can share the pbit file if that works. I'm unsure how to insert the file within this thread so should I just send it via email?
Also, repeated purchases are determinded by the TID count.Thank you again.
Pete
- v-jiascu-msftMicrosoft Employee
Hi Pete,
You can upload the file to a cloud drive like OneDrive or GoogleDrive and then share the download link here.
Best Regards,
Dale