Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
99 | |
69 | |
46 | |
39 | |
33 |
User | Count |
---|---|
163 | |
110 | |
61 | |
51 | |
40 |