Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
I have been strugling to make the following dax measure work without taking a full 2 minutos to load.
How it works: we have 2 different group slicers in which the user chooses 2 items he wants to compare with and between a certain time period to know if clients are buying both products
Tables i will be focusing on:
Calendar Date ( day, month year etc )
Fct_sales Date ( has the date when the purchase occurred)
The problem:
We have 2 versions with datebetween, one where we used (calendar date table) - 3months and one where we used (Fct_Sales dates) -3months.
The same dax measure worked fine using calendar date but using fct sales date takes ages to load and we understand that this is not the best practice but intent to keep it this way if possible
Measures: with (Fct_Sales dates) -3months.
Min date Fct_Table date : Lastdate(FCT_SALES[Date])
Max date Fct_Table date :
VAR dataref = [MAX DATE Actual]
Measure:
A solution to the problem has been attached. Please have a look at the file. Adjust it to your needs but take a good look at the measures. I do not use INTERSECT to calculate the clients in both groups.
The dataset contains 500 000 rows of sales data and is pretty performant.
Best
D
Thanks, i will give it a look
Hello thanks for taking time to responde.
1) REF_DT[DT_DT] i forgot to change that one, but its the "calendar[date)
2 and 3) i actually using calendar table to filter between timelines and only using the dates in my fact table to establish a start and finish point.
4) i switched to "userelationship" but takes the same amount of time
I managed to find a workaround, its not perfect and wont be much use but works for now.
Very difficult to troubleshoot DAX performance issues without the data and such. However, I can already tell you that you probably don't need the VALUES statement and I seriously question TREATAS but without knowing your data and model it's very difficult to say anything definitively. See these articles:
User | Count |
---|---|
12 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
27 | |
19 | |
14 | |
11 | |
7 |