March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have 2 calculated Columns -> InFull = IF([ActualDuration]<[ScheduledDuration]*.85,"Not In Full","In Full") &
Punctuality = IF (OTIF[DutyTimeFrom]<OTIF[TimeFrom]-1/24*.25,"Early",IF (OTIF[DutyTimeFrom]>OTIF[TimeFrom]+1/24*.25,"Late","On Time"))
I need to add the total number of times that the text 'In Full' appears & "On Time". I only want to add them if both appear.
Solved! Go to Solution.
@android1 This should work...
In Full & On Time = COUNTROWS ( FILTER ( 'OTIF', 'OTIF'[Punctuality] = "On Time" && 'OTIF'[InFull] = "In Full" ) )
Try this:
InFullOnTime = CALCULATE(COUNT([SomeColumn]),FILTER(OTIF,OTIF[InFull] = "In Full"),FILTER(OTIF,OTIF[Punctuality] = "On Time"))
Thanks for your reply. Can I use Count when dealing with strings? Getting the error attached.
Use COUNTA
Can you explain what column [Some Column] should refer to? I tried referencing both [In Full] & [Punctuality]
with no joy.
@android1 This should work...
In Full & On Time = COUNTROWS ( FILTER ( 'OTIF', 'OTIF'[Punctuality] = "On Time" && 'OTIF'[InFull] = "In Full" ) )
Hi Sean,
I was sure when I saw your && suggestion that it was something I had already tried.
But whatever, yours works perfectly. The Matrix option is very interesting.
Thanks a million for this.
Thanks to smoupre too for your input.
@android1 you could also just create a Matirx and use a simple Measure like in the picture
Countrows = COUNTROWS('Table')
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
202 | |
137 | |
106 | |
70 | |
68 |