Forum Discussion
Measure that shows whether the process has been completed
Observe the table with the data below:
| Plot | Date | Type | Processed Area | Total Area |
| P1 | 2025/01/01 | A | 12.1 | 23 |
| P1 | 2025/01/02 | A | 10.9 | 23 |
| P2 | 2025/01/02 | A | 10.1 | 20 |
| P2 | 2025/01/03 | A | 9.8 | 20 |
| P2 | 2025/01/01 | B | 10.2 | 15 |
The Processed Area column represents the area that was processed on that day in that specific plot with that specific type. The Total Area column is the total area of that specific plot with the specific type.
I need a measure that, in a table visual, looks like this:
| Plot | First Date | Type | Situation | Sum of the processed area | Total Area |
| P1 | 2025/01/01 | A | Processed | 23 | 23 |
| P2 | 2025/01/02 | A | Processing | 19.9 | 20 |
| P2 | 2025/01/01 | B | Processing | 10.2 | 15 |
I need a "Situation" measure that shows whether a specific type in a specific plot has been fully processed. This can't be done directly in the table visual because I'm going to put it in a public link, and for some reason, it doesn't work there.
jobf I believe that a situation measure like that would look similar to the following:
Situation Measure = VAR _ProcessedArea = SUM( 'Table'[Processed Area] ) VAR _TotalArea = MAX( 'Table'[Total Area] ) VAR _Return = IF( _ProcessedArea = _TotalArea, 1, 0 ) RETURN _ReturnI assume you only have Fact table instead using a star-schema here. If so please try using the measures below in your visual:
First Date = CALCULATE ( MIN ( 'Data'[Date] ), ALLEXCEPT ( 'Data', 'Data'[Plot], 'Data'[Type] ) ) Processed Area (Sum) :+= CALCULATE ( SUM ( 'Data'[Processed Area] ), ALLEXCEPT ( 'Data', 'Data'[Plot], 'Data'[Type] ) ) Total Area (Group) = CALCULATE ( MAX ( 'Data'[Total Area] ), ALLEXCEPT ( 'Data', 'Data'[Plot], 'Data'[Type] ) ) Situation = VAR Proc = [Processed Area (Sum)] VAR Tot = [Total Area (Group)] RETURN IF ( NOT ISBLANK ( Tot ) && Proc >= Tot, "Processed", "Processing" )Visual:
- Fact[Plot]
- [First Date]
- Fact[Type]
- [Situation]
- [Processed Area(Sum)]
- [Total Area]
6 Replies
- AnonymousNot applicable
Hi jobf
Thank you for reaching out to the Microsoft Fabric Forum Community.
GeraldGEmerick Ashish_Mathur krishnakanth240 cengizhanarslan Thanks for the inputs.
I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.
- AnonymousNot applicable
Hi jobf
Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.
- GeraldGEmerick
Memorable Member
jobf I believe that a situation measure like that would look similar to the following:
Situation Measure = VAR _ProcessedArea = SUM( 'Table'[Processed Area] ) VAR _TotalArea = MAX( 'Table'[Total Area] ) VAR _Return = IF( _ProcessedArea = _TotalArea, 1, 0 ) RETURN _Return - cengizhanarslan
Super User
I assume you only have Fact table instead using a star-schema here. If so please try using the measures below in your visual:
First Date = CALCULATE ( MIN ( 'Data'[Date] ), ALLEXCEPT ( 'Data', 'Data'[Plot], 'Data'[Type] ) ) Processed Area (Sum) :+= CALCULATE ( SUM ( 'Data'[Processed Area] ), ALLEXCEPT ( 'Data', 'Data'[Plot], 'Data'[Type] ) ) Total Area (Group) = CALCULATE ( MAX ( 'Data'[Total Area] ), ALLEXCEPT ( 'Data', 'Data'[Plot], 'Data'[Type] ) ) Situation = VAR Proc = [Processed Area (Sum)] VAR Tot = [Total Area (Group)] RETURN IF ( NOT ISBLANK ( Tot ) && Proc >= Tot, "Processed", "Processing" )Visual:
- Fact[Plot]
- [First Date]
- Fact[Type]
- [Situation]
- [Processed Area(Sum)]
- [Total Area]
- Ashish_Mathur
Super User
Hi,
Write this measures
PA = sum(Data[Processed area])
TA = min(Data[Total area])
Situation = if([PA]<[TA],"Processing","Processed")
Hope this helps.
- krishnakanth240
Super User
Hi jobf
Can you try this measure.
Situation =
VAR _Processed = SUM(data[Processed Area])
VAR _Total = MAX(data[Total Area])
RETURN IF (_Processed >= _Total, "Processed", "Processing")