This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
I want two measures out of this sample table:
| Orders | Date | TargetRevenue | MaxWorkDays | RevenueMonth | ||
| 12344 | 29.03.2021 | 15000 | 19 | 03.2021 | ||
| 12345 | 30.03.2021 | 15000 | 19 | 03.2021 | ||
| 12346 | 31.03.2021 | 20000 | 20 | 04.2021 | ||
| 12347 | 01.04.2021 | 20000 | 20 | 04.2021 | ||
| 12348 | 02.04.2021 | 20000 | 20 | 04.2021 | ||
| 12349 | 03.04.2021 | 20000 | 20 | 04.2021 | ||
| 12350 | 04.04.2021 | 20000 | 20 | 04.2021 |
From a calculation and revenue-wise perspective the last workday of a month belongs to the next month. Thats the reason you see that 31.03.2021 has April as monthdate "04.2021" in its RevenueMonth column. Because of that I cannot use Date for filtering Ihink instead I use RevenueMonth which is formatted as Date column. Also in the table is a column showing the workdays and Targetrevenue for that repspective revenuemonth.
1.I nead a measure for a KPI -Card which always display the max Workdays of current month.
2.I need a measure for a KPI-Card which always showing me the TargetRevenue of current month. It is different each month.
Thank you very much in advance.
Best.
Solved! Go to Solution.
Hi @Applicable88 ,
Please try the following formula:
Max Workdays of current month =
VAR _month =
CALCULATE (
MAX ( 'Table'[RevenueMonth] ),
FILTER (
ALL ( 'Table' ),
YEAR ( [Date] ) = YEAR ( TODAY () )
&& MONTH ( [Date] ) = MONTH ( TODAY () )
)
)
RETURN
CALCULATE (
MAX ( 'Table'[MaxWorkDays] ),
FILTER ( 'Table', [RevenueMonth] = _month )
)
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Applicable88 ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it.😀
Best Regards,
Eyelyn Qin
Hi @Applicable88 ,
Please try the following formula:
Max Workdays of current month =
VAR _month =
CALCULATE (
MAX ( 'Table'[RevenueMonth] ),
FILTER (
ALL ( 'Table' ),
YEAR ( [Date] ) = YEAR ( TODAY () )
&& MONTH ( [Date] ) = MONTH ( TODAY () )
)
)
RETURN
CALCULATE (
MAX ( 'Table'[MaxWorkDays] ),
FILTER ( 'Table', [RevenueMonth] = _month )
)
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
How can I make this As card.
Like this
12:00pm Has the highest value
inside the card "Actual Value"
@Applicable88 , Create a measure like
measure =
var _max = maxx(allselected(Table), Table[RevenueMonth])
var _maxdt = maxx(filter(Table, Table[RevenueMonth] =_max),[Date])
return
calculate(sum(Table[TargetRevenue]), filter(Table, Table[Date] =_maxdt))
Hello @amitchandak,
thanks so far, but I already have target revenues for the whole year. That means the table is not ending in this month and I cannot get the value with MAX() function. Otherwise it give values for next year. I need a function where it really giving me the revenuetarget of current month.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 21 | |
| 18 |