Forum Discussion
Anonymous
8 years agoNot applicable
Request for DAX Help
Dear All, I request help to solve a scenario. I have a input table, using that I need to create a output report (Refer tables below). I am having trouble in creating the dax formulas for columns S...
- 8 years ago
Hi Anonymous
I think I see what you are after. Please try the following three calculated measures. I have attached a simple PBIX file that contains the measures.
Shares Count Current Year = VAR myDate = TODAY() RETURN SUMX( FILTER( 'Table1', 'Table1'[Validfrom] <= myDate && 'Table1'[Validto] >= myDate ), 'Table1'[Sharecount] )Shares Count Previous Year = VAR myDate = EDATE(TODAY(),-12) RETURN SUMX( FILTER( 'Table1', 'Table1'[Validfrom] <= myDate && 'Table1'[Validto] >= myDate ), 'Table1'[Sharecount] )Difference = [Shares Count Current Year] - [Shares Count Previous Year]
Phil_Seamark
8 years agoMicrosoft Employee
Hi Anonymous
I think I see what you are after. Please try the following three calculated measures. I have attached a simple PBIX file that contains the measures.
Shares Count Current Year =
VAR myDate = TODAY()
RETURN
SUMX(
FILTER(
'Table1',
'Table1'[Validfrom] <= myDate &&
'Table1'[Validto] >= myDate
),
'Table1'[Sharecount]
)Shares Count Previous Year =
VAR myDate = EDATE(TODAY(),-12)
RETURN
SUMX(
FILTER(
'Table1',
'Table1'[Validfrom] <= myDate &&
'Table1'[Validto] >= myDate
),
'Table1'[Sharecount]
)Difference = [Shares Count Current Year] - [Shares Count Previous Year]
Anonymous
8 years agoNot applicable
Hi Phil Seamark,
Thank you so much for the response, I now able to generate the report.
Appreciate all your help.
Regrads,
rnagalla