March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I am working on a project. The objective of the project is
1. To find the number of store visited in last 3 months. For example. If the user select March -2024, then it will be unique store visited in March -2024, Feb -2024 and Jan -2024. Similary, if the user select Feb -2024 then I need to find the store visited in Feb-2024, Jan-2024 and Dec -2023
2. Find the total store that has Brand BBB (or any other brand or product) in the latest visit. I want to have Brand slicer, product slicer. The user will select the value from this slicer and dax will output out of total store visited in last 3 months how many has those brand.
Data Model,
In the data model,
Product is connect to TRAX SOS by product key
Canvas is connected to TRAX SOS by Store key
Date is connectd to Canvas by Date[Date]
Date is connect to TRAX SOS by Date[Date] . this is inactive relationship.
My logic
When useer chooe date in the slicer (say March 2024), the it filter the canvas to show only the store present in March 2024. This Canvas also filter the TRAX SOS to show only March 2024. But I have removed the fitler from Canvas to TRAX SOS. With this I find teh total store visited in last 3 months as follows
Solved! Go to Solution.
Hi @Mkrishna ,
Please update the formula of variable STORE as below:
VAR STORE =
CALCULATE (
COUNTROWS (
FILTER (
ALL ( 'TRAX SOS' ),
'TRAX SOS'[store_number] = MAX ( 'Canvas'[Store Number] )
&& 'TRAX SOS'[Visit Date] = MaxDate
&& 'TRAX SOS'[Visit Date] >= DATE ( 2023, 12, 01 )
&& 'TRAX SOS'[Visit Date] <= DATE ( 2024, 02, 29 )
&& 'TRAX SOS'[Brand] IN ALLSELECTED ( 'Product'[Brand] )
)
),
USERELATIONSHIP ( 'TRAX SOS'[Visit Date], 'Date'[Date] )
)
Best Regards
Hi @Mkrishna ,
Please update the formula of variable STORE as below:
VAR STORE =
CALCULATE (
COUNTROWS (
FILTER (
ALL ( 'TRAX SOS' ),
'TRAX SOS'[store_number] = MAX ( 'Canvas'[Store Number] )
&& 'TRAX SOS'[Visit Date] = MaxDate
&& 'TRAX SOS'[Visit Date] >= DATE ( 2023, 12, 01 )
&& 'TRAX SOS'[Visit Date] <= DATE ( 2024, 02, 29 )
&& 'TRAX SOS'[Brand] IN ALLSELECTED ( 'Product'[Brand] )
)
),
USERELATIONSHIP ( 'TRAX SOS'[Visit Date], 'Date'[Date] )
)
Best Regards
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |