Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Solved! Go to Solution.
Hi @KasRotodyne ,
According to the formula you provided, today() gets the current date value instead of the year, you need to convert the formula by year(today()).
Try measure like below:
Spend =
CALCULATE (
SUM ( T_PurInvoiceMain[BasicCurrNetPrice_FactuurLeverancier] ),
FILTER (
ALL ( T_PurInvoiceMain ),
T_PurInvoiceMain[Processed YEAR] <= MAX ( T_PurInvoiceMain[Processed YEAR] )
&& MIN ( T_PurInvoiceMain[Processed YEAR] ) <= YEAR ( TODAY () )
)
)
If the problem is still not resolved, you need to provide the relevant test data and a screenshot of the desired result, so that I can answer your question as soon as possible. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @KasRotodyne ,
According to the formula you provided, today() gets the current date value instead of the year, you need to convert the formula by year(today()).
Try measure like below:
Spend =
CALCULATE (
SUM ( T_PurInvoiceMain[BasicCurrNetPrice_FactuurLeverancier] ),
FILTER (
ALL ( T_PurInvoiceMain ),
T_PurInvoiceMain[Processed YEAR] <= MAX ( T_PurInvoiceMain[Processed YEAR] )
&& MIN ( T_PurInvoiceMain[Processed YEAR] ) <= YEAR ( TODAY () )
)
)
If the problem is still not resolved, you need to provide the relevant test data and a screenshot of the desired result, so that I can answer your question as soon as possible. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@KasRotodyne , Try like
if year not date
Spend = CALCULATE (
SUM (T_PurInvoiceMain[BasicCurrNetPrice_FactuurLeverancier] ),
FILTER (
ALLSELECTED ( T_PurInvoiceMain ),
T_PurInvoiceMain[Processed YEAR] <= MAX ( T_PurInvoiceMain[Processed YEAR] )
&& (T_PurInvoiceMain[Processed YEAR]) <= year(TODAY ())))
id year column is a date
Spend = CALCULATE (
SUM (T_PurInvoiceMain[BasicCurrNetPrice_FactuurLeverancier] ),
FILTER (
ALLSELECTED ( T_PurInvoiceMain ),
T_PurInvoiceMain[Processed YEAR] <= MAX ( T_PurInvoiceMain[Processed YEAR] )
&& (T_PurInvoiceMain[Processed YEAR]) <= (TODAY ())))
Nope
It still wont work. I have tried multiple ways and everytime it seems to work with other but not here.
#Error or the sum of all spend is what the funtion returns.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
106 | |
87 | |
75 | |
66 |
User | Count |
---|---|
125 | |
114 | |
98 | |
81 | |
73 |