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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Julux12
New Member

I need the date of a blank count

Hello everyone! I hope you are well, i have the following problem with a data of date (in text format or date format) and the type of work, so, the date I need is the one that has the minimum value, that is, the one where no count was found (means that there was no type "S" work on that date), as shown in the following image

Julux12_0-1677725840076.png

 

to better test this I made a test table like this

 

Date                 Type of work

3/01/2023M
3/01/2023M
3/01/2023S
3/01/2023S
2/01/2023M
2/01/2023M
2/01/2023M
1/01/2023M
1/01/2023

S

Julux12_2-1677726367823.png

and i put my matrix with the data

Julux12_4-1677727233548.png

 

and i tried the following meausure for this but obviously it didn't work for me

 

date for min work S =
var _summarized = SUMMARIZE(Table_1, Table_1[Date], "var1",
CALCULATE(COUNT(Table_1[Type of work]),FILTER(Table_1, Table_1[Type of work] = "S"))
)
return MINX(
    FILTER(
        _summarized,
        [var1] = MINX(_summarized,[var1])
    ),
    [Date]
)
Julux12_3-1677726671389.png

 

please, can you help me ?

 

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

try this @Julux12 

Measure = 
VAR base = tbl
VAR s =
    SUMMARIZE ( FILTER ( base, [Column2] = "S" ), [Column1] )
VAR m =
    SUMMARIZE ( FILTER ( base, [Column2] = "M" ), [Column1] )
VAR anti =
    TOPN ( 1, EXCEPT ( m, s ), [Column1], ASC )
RETURN
    MAXX ( anti, [Column1] )

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

2 REPLIES 2
smpa01
Super User
Super User

try this @Julux12 

Measure = 
VAR base = tbl
VAR s =
    SUMMARIZE ( FILTER ( base, [Column2] = "S" ), [Column1] )
VAR m =
    SUMMARIZE ( FILTER ( base, [Column2] = "M" ), [Column1] )
VAR anti =
    TOPN ( 1, EXCEPT ( m, s ), [Column1], ASC )
RETURN
    MAXX ( anti, [Column1] )

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Thank you!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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