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.
Hi all,
Taking account the attached pbix scenerio i need help to compose a new measure that complete some requirements:
1)By default alway we have to select a product.If nothing is selected one card have to show "Select a product" and the other have to select the max date of the column "Fecha".
2)When the produt is select, the card with the text "Select a product" have to show the max commericalWeek of the table "semanacomercialventa" taking accout the max of the fecha.
3)If the "tipoproducto" have more thatn one result as is showed in the image. The card should select the max fecha and also the max Week by default.
4)If is selected any other commercial week of the list of options with data should be selected the week selected and the max date.
I hope you can help me, I'm really stucked with this.
Here also attached some test i've been performance without any result.
CommercialWeekSelected =
IF(
ISFILTERED('semanacomercialventa'[commericalWeek]),
CALCULATE(
MAX('semanacomercialventa'[commericalWeek]),
FILTER(
'semanacomercialventa',
'semanacomercialventa'[Index] = MAX('semanacomercialventa'[Index])
)
),
"Select a product"
)
Solved! Go to Solution.
Hi @cromero2416 ,
According to your description, I download your sample and here's my solution.
CommercialWeekSelected =
IF (
ISFILTERED ( 'Product'[tipoproducto] ),
MAXX (
FILTER (
'ventas',
'ventas'[fecha]
= MAXX (
FILTER (
'ventas',
'ventas'[typoventa] = SELECTEDVALUE ( 'Product'[tipoproducto] )
),
'ventas'[fecha]
)
),
'ventas'[commericalWeek]
),
"Select a product"
)
Get the correct result.
Requirement1:
Requirement2,3:
Requirement4:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cromero2416 ,
According to your description, I download your sample and here's my solution.
CommercialWeekSelected =
IF (
ISFILTERED ( 'Product'[tipoproducto] ),
MAXX (
FILTER (
'ventas',
'ventas'[fecha]
= MAXX (
FILTER (
'ventas',
'ventas'[typoventa] = SELECTEDVALUE ( 'Product'[tipoproducto] )
),
'ventas'[fecha]
)
),
'ventas'[commericalWeek]
),
"Select a product"
)
Get the correct result.
Requirement1:
Requirement2,3:
Requirement4:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Up.
Thanks
@cromero2416 , You might have to use
CommercialWeekSelected =
IF(
calculate(ISFILTERED('semanacomercialventa'[commericalWeek]), allselected()) ,
CALCULATE(
MAX('semanacomercialventa'[commericalWeek]),
FILTER(
'semanacomercialventa',
'semanacomercialventa'[Index] = MAX('semanacomercialventa'[Index])
)
),
blank()
)
for that message we keep an image behind and try to use conditional background formatting,
with #FFFFFF00 , transparent color and #FFFFFF white color
Hi all,
Could someone help with this?
Thanks in advance
@cromero2416 , Based on what I got , Think I have similar calculation in these two blogs
Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0
hi @amitchandak
mmm i think no , i don't need to sum anything. Is more related to how the dates and comercial weeks are showed in the card taking account the filters in the report. You have the example attached .
Thanks in advance
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 |
---|---|
118 | |
104 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |