Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I need to show the data Show Data in Matrix until last date sale in the last year . I need in this format, because is important at the analysis moment to compare years with only the last date of sales.
Solved! Go to Solution.
Hi, @mrbajana
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Visual Control =
var m =
CALCULATE(
MAX('Table'[Date]),
FILTER(
ALL('Table'),
'Table'[Month]=MAX('Table'[Month])
)
)
var d =
DATE(MAX('Table'[Year]),MONTH(m),DAY(m))
var x = MAX('Table'[Date])
return
IF(
ISINSCOPE('Table'[Day]),
IF(
x<=d,
1,0
),
1
)
Then you need to put the measure in the visual level filter to display the result.
Best Regards
Allan
If this post helps,then consider Accepting it as the solution to help other members find it faster.
Hi, @mrbajana
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Visual Control =
var m =
CALCULATE(
MAX('Table'[Date]),
FILTER(
ALL('Table'),
'Table'[Month]=MAX('Table'[Month])
)
)
var d =
DATE(MAX('Table'[Year]),MONTH(m),DAY(m))
var x = MAX('Table'[Date])
return
IF(
ISINSCOPE('Table'[Day]),
IF(
x<=d,
1,0
),
1
)
Then you need to put the measure in the visual level filter to display the result.
Best Regards
Allan
If this post helps,then consider Accepting it as the solution to help other members find it faster.
@mrbajana , In case you are using date table. Assumed you current measure is measure
new measure =
var _max = format(maxx(allselected(sales), sales[sales date]), "MMDD")
return
calculate([measure], filter(Date, format(Date[Date],, "MMDD") <=_max))
not using sales table
new measure =
var _max = format(maxx(allselected(sales), sales[sales date]), "MMDD")
return
calculate([measure], filter(sales, format(sales[sales date],, "MMDD") <=_max))
User | Count |
---|---|
141 | |
70 | |
69 | |
53 | |
52 |
User | Count |
---|---|
208 | |
94 | |
64 | |
60 | |
57 |