Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everybody
please i need your help.
I have two files, dateset1 and dataset 2.
I want to link between the two files, provided that :
for example i want to divide the total of the date 08/28/2021 in database1 by the fear percentage of each row of the date 28/08/2021 in database 2.
Explanation with pictures
I want her Dax function which should I use.
many thanks
fils :
Solved! Go to Solution.
HI @Kadrimedquali,
You can try to use the following expression if it suitable for your requirement:
Measure =
VAR currDate =
MAX ( Table2[Date] )
VAR currPer =
MAX ( Table2[Percent] )
RETURN
DIVIDE (
SUM ( Table2[Value] ),
CALCULATE (
SUM ( Table1[Value] ),
FILTER ( ALLSELECTED ( Table1 ), [Date] = currDate )
) * currPer
)
Regards,
Xiaoxin Sheng
HI @Kadrimedquali,
You can try to use the following expression if it suitable for your requirement:
Measure =
VAR currDate =
MAX ( Table2[Date] )
VAR currPer =
MAX ( Table2[Percent] )
RETURN
DIVIDE (
SUM ( Table2[Value] ),
CALCULATE (
SUM ( Table1[Value] ),
FILTER ( ALLSELECTED ( Table1 ), [Date] = currDate )
) * currPer
)
Regards,
Xiaoxin Sheng
Firstly, create a Date table with unique continuous dates covering the range of dates included in the model. Join this Date table in 1-to-many relationships with both fact tables. Finally use the date table in your visuals, measures, slicers, filters... this makes the DAX straightforward and makes the model efficient
Proud to be a Super User!
Paul on Linkedin.
Link by date
the link provided shows access denied.
Proud to be a Super User!
I second that. Access denied to both files
User | Count |
---|---|
98 | |
91 | |
84 | |
72 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |