Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
volt26
Helper I
Helper I

Measure to get first matching text from a column (with custom filters) and show it in card visual

Hello!


I'm trying to do something that I thought was simple but I hit another wall...

 

I created a card with these filters on it :

volt26_0-1720031902325.png
it returns this (and it is the desired result) : 

volt26_1-1720031951748.png

 

The problem is, I want to create a measure that will return exactly that and I keep failing. Can you help me out please? Here is what sounded the most logical to me :

Measure = CALCULATETABLE(FIRSTNONBLANK(D_DATE[CYCLE_TEXTE_MOIS_J],D_DATE[CYCLE_TEXTE_MOIS_J]),D_DATE[ANNEE]="2024", D_DATE[CYCLE_SEQ]="1")

I get this on the card :
volt26_2-1720032293294.png

 



Thank you for your help!
1 ACCEPTED SOLUTION
volt26
Helper I
Helper I

I think I found the correct formula but somehow, the result is blank and it shouldnt!!

Measure =
CALCULATE(
    MIN('D_DATE'[CYCLE_TEXTE_MJ]),
    FILTER(D_DATE,[CYCLE_SEQ]="2")
)


If I look at the table, I can see there is no blank values. The MIN value I should get is "03-11 au 04-14" :
volt26_0-1720102200810.png

 

View solution in original post

6 REPLIES 6
volt26
Helper I
Helper I

Oooops!

That last formula did the trick. The only reason it didn't work is I had another filter going on that I forgot about.

 

Thank you for your help! It pointed me in the right direction!

volt26
Helper I
Helper I

I think I found the correct formula but somehow, the result is blank and it shouldnt!!

Measure =
CALCULATE(
    MIN('D_DATE'[CYCLE_TEXTE_MJ]),
    FILTER(D_DATE,[CYCLE_SEQ]="2")
)


If I look at the table, I can see there is no blank values. The MIN value I should get is "03-11 au 04-14" :
volt26_0-1720102200810.png

 

Anonymous
Not applicable

Hi @volt26 ,

 

I think on a small mistake, I did notice that 2024 is a number in your filter and the expression uses quotes to change it to a text type, so removing the quotes from 2024 in the expression would return the correct answer.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

I know it sounds weird but this column is set as string in the database. I believe it is to allow the user to enter other stuff than a year... Unfortunately, I can't change anything about that.

ryan_mayu
Super User
Super User

maybe you can try this

 

Measure = CALCULATE(MIN(D_DATE[CYCLE_TEXTE_MOIS_J],D_DATE[CYCLE_TEXTE_MOIS_J]),D_DATE[ANNEE]="2024"D_DATE[CYCLE_SEQ]="1")




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Unfortunately it doesn't work. It doesn't accept the 2nd D_DATE[CYCLE_TEXTE_MOIS_J]

volt26_0-1720098022793.png

 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors