Forum Discussion
Date Column not populating in Report
Hello friends I am new to power bi ,
I am not able to understand how to choose and apply funcation/Dax command on Reports. Is there any limitation that certain DAX funcation only work while creating into Tabular model area and they will not work or populate in while creating on Report level.
For eg. I have X1Date (date column ) in my tab. model and I want to use this column to find out Date difference between this X1date and Getdate. But while creating new measure its showing "Can not find X1date" or something.
While adding MAX(X1Date) into it it shows me. Not sure how to calculate it.
This is I want to achive ---->> Meaure = DATEDIFF(X1Date, Today(), YEAR)
Please help
- Anonymous5 years ago
Nothing .. as of now thanks for your effort.
6 Replies
- DataInsights
Super User
Anonymous,
Measures require an aggregate function, since they aggregate values from multiple rows in a table. Try the measure below in a table visual.
Meaure = DATEDIFF ( MAX ( X1Date ), TODAY (), YEAR )If you prefer to have a calculated column in the table (the tabular model area), you don't need the MAX function.
The link below should help:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
- AnonymousNot applicable
Yes you are right but I have to create measure in Report area itself.
- AnonymousNot applicable
Hi Anonymous,
Anything else you confused about these? If that is a case, you can feel free to post here with detailed descriptions.
Regards,Xiaoxin Sheng
- AnonymousNot applicable
Hi Anonymous,
The measure formula is calculated based on row contents and it means the aggregated records based on the visual category group. So its result can be dynamic changes when you use the aggregate function on it.
For this scenario, it means you need to do some extra processing to extract the specific value.
For example: you can try to use aggregate functions or selectedvalue functions to extract the 'current' value based on its filters.Using the SELECTEDVALUE function in DAX
Regards,
Xiaoxin Sheng
- AnonymousNot applicable
Yes I can try but this SELECTEDVALUE funcation also not appearing/populating.