Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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]
                 ) + 0

What 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 3
v-jiascu-msft
Employee
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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not 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

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

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.