Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi i'm connecting to our DW through an SSAS live connection. Star schema roughly as follows:
dimCustomer - list of customers
dimEngagementType - list of possible actions a customer can take to engage with us (e.g. registered for webinar)
factCustomerEngagement - transaction fact of all customer engagements
I've been given the following requirement: show me all customers who performed a particular action (e.g. registered for webinar) and then show me all other actions they took and when
So essentially i need to filter the fact table twice. Once on engagement type to get the list of customers who performed the particular action. Then i need to re-filter it using that customer list to show me what else they did.
Can i do this in DAX? I come from a SQL background so trying to rewire my brain.
Thanks for any help.
Dear mdiz,
I am struggling with a similar problem and I was wondering if and how you've solved this issue in the meantime?
or in case the actions is supposed to be dynamic it is even more dependant on the visual setup:
1) how do users pick up the action to be referenced (slicer?) Can there be multiple actions selected or only one at a time? if there are more should the which operator should be used (AND/OR?)
2) do you want to show nuber of categorised number of other actions, or action names? if action names how do you want to aggregate multiple actions for a single customer?
etc.
Sorry for the delay getting back to you on this. Appreciate the followup response. Think i follow.
you can query SSAS using DAX so it would return a table - which would be very SQL thing to do, and I don't recommend it 🙂
what would more DAX focused approach is following:
1) create a measure that shows nr of engagements, e.g.
NrOfEnagements = COUNTROWS(factCustomerEngagement) -- assuming that each row is single engagement
2) crate a visual using Customer Name from dimCustomer and [NrOfEnagements ] - it will only show customers that have engaged, and the number of such actions
2) if you then use slicer to filter e.g. 'registered for webinar' in dimEngagementType it will pass the filter from the slicer to the visual, effectively showing all the customers that have made that action and the number of such actions
you could also write it explicitely like this:
NrOfRegistrations = CALCULATE( COUNTROWS(factCustomerEngagement), dimEngagementType[Action] = "registered for webinar" )
or referencing the first measure
NrOfRegistrations = CALCULATE( [NrOfEngagements], dimEngagementType[Action] = "registered for webinar" )
Thanks for the response, really appreciate it. However won't those formulas just give me a count by engagement type? What i need to answer is:
Of the 5 people who registered for a webinar, what other actions did those 5 people do? How else did they engage with us?
Does that make sense?
the measure always gives different values dependng on filter context coming from visuals, report/page/visual filters etc. and how visual is structured
for your example you can use [NrOfEngagements] together with Customer Name in the visual and only use [NrOfRegistrations]<>0 in the filter of that visual
I'd suggest just trying these measures in different layouts, once you have more clear idea how you want to present the data and what to calculate we can adjust the measures
e.g. you can create measure using CONCATENATEX that would return a string of all actions for the users that have nrofregistrations>0, which is possible but is quite unusal way of presenting data
right now I'm not clear what you want to present and in which format
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
106 | |
75 | |
44 | |
39 | |
33 |
User | Count |
---|---|
166 | |
90 | |
65 | |
46 | |
43 |