Forum Discussion
Show current year
I am preparing a header for my power bi report in the following way
Sales for the year 2020 - question is how do I show the year dynamically ? Can I add a new column to the report in the power bi desktop that just shows current year ?
Hi Anonymous ,
Try this:
Measure = "My header -" & FORMAT ( TODAY (), "mmmyyyy" )Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
9 Replies
- camargos88Community Champion
Anonymous ,
Perhaps a card with measure returning que current year works.
Can you provide more details ?
- AnonymousNot applicable
so here is the requirement, It doesnt have to do anything with the data,
In my power bi heading for the report, I just want to show below in the header of report whether there is data or not
sales report - November 2020
The month and year should always show current month and year....thats all, nothing fancy, I can write oracle function to display this information in the oracle view i am using as source, but if there is no data for the month it would be empty....can I use dax somehow in the power bi header to show this info ? (maybe in a card ?) , dont want to invovle data table etc
- PhilipTreacySuper User
Hi Anonymous
I'm not sure if you mean you want to show the current year i.e. 2020, or the currently selected year?
And do you want the heading to read Sales for the year 2020 ?
Please clarify. If you just want the current year (2020) this measure will do
Current Year = CONCATENATE("Sales for the Year ", FORMAT(TODAY(),"yyyy"))Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.- AnonymousNot applicable
so here is the requirement, It doesnt have to do anything with the data,
In my power bi heading for the report, I just want to show
sales report - November 2020
The month and year should always show current month and year....thats all, nothing fancy, I can write oracle function to display this information in the oracle view i am using as source, but if there is no data for the month it would be empty....can I use dax somehow in the power bi header to show this info ? (maybe in a card ?) , dont want to invovle data table etc
- AnonymousNot applicable
Hi Anonymous,
Showing current year in header for report can be done with help if DAX measure and Card visual.
DAX measure:
Report Header = "Sales for the year " & YEAR ( TODAY () )Please note doing this, only header will get the value for current year, and data will be shown as per the slicers selected.You can also think of using below DAX measure to dynamically change the year value in header, with change in the selected Year.DAX Measure:Report Header = "Sales for the year " & SELECTEDVALUE( 'Calendar'[Year] , "Multiple Years" )RomilIf I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up. - AnonymousNot applicable
Hi Anonymous,
Showing current year in header for report can be done with help if DAX measure and Card visual.
DAX measure:
Report Header = "Sales for the year " & YEAR ( TODAY () )Please note doing this, only header will get the value for current year, and data will be shown as per the slicers selected.You can also think of using below DAX measure to dynamically change the year value in header, with change in the selected Year.DAX Measure:Report Header = "Sales for the year " & SELECTEDVALUE( 'Calendar'[Year] , "Multiple Years" )RomilIf I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.- AnonymousNot applicable
You mean create a new dax measure column which is static ?
- AnonymousNot applicable
I am using card visual and a measure in the table, so good thing is, even though there is no data in the report I can see the header
Measure = "My header -"& format(month(today()),"mmm") & year(today())why is it showing Jan2020 ? why not current month ?- IceyCommunity Support
Hi Anonymous ,
Try this:
Measure = "My header -" & FORMAT ( TODAY (), "mmmyyyy" )Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.