The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have made a power bi report in which the results per month are presented compared to the same month a year earlier or the budget for that month. At the moment the month we are still in the middle of is also presented, but these values are always lower as long as the month is not yet at the end. Is there a way to only display a month when it's completely over?
should I solve this in my measures or through filter options. what is the best approach?
I myself am thinking of a calculated column with an if statement. which checks whether the date column contains a date that falls in a month that is in the past. if so a 1 else a 0. then so I can filter on 1. I just don't know how to write this formula.
Solved! Go to Solution.
Complete month based Today =
var _max = if( day(today()) >=15 ,eomonth(today(),-1), eomonth(today(),-2) )
return
IF(Table[datecolumn] <=_max,1,0)
Complete month based Today =
var _max = if( eomonth(today(),0)=today(), Today() , eomonth(today(),-1) )
var _min = eomonth(_max,-1)+1
return
CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date] >= _min && 'Date'[Date] <=_max ) )
Hi @amitchandak ,
based on your example I have now created the following and it works well:
Complete month based Today =
var _max = if( day(today()) >=15 ,eomonth(today(),-1), eomonth(today(),-2) )
return
IF(Table[datecolumn] <=_max,1,0)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
78 | |
67 | |
52 | |
50 |
User | Count |
---|---|
121 | |
120 | |
78 | |
63 | |
62 |