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

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.

Reply
anushavikram
Frequent Visitor

Difference between both the ways of using TREATAS

Hi, 

 

When i created the following measures, i expected both the values to be same but they are different. 

Can anyone help me understand why that is the case.? 

 Measure 1 = 

CALCULATE (
COUNT ( 'Benchmark Group Base data'[Group Ticket days grouping] ),
'Benchmark Group Base data'[benchmarkgroup] = "Government",
TREATAS (
VALUES ( 'Benchmark Base Data'[Ticket days grouping] ),
'Benchmark Group Base data'[Group Ticket days grouping]
),
TREATAS (
VALUES ( 'Benchmark Base Data'[International or Domestic] ),
'Benchmark Group Base data'[International or Domestic]
),
TREATAS (
VALUES ( 'Benchmark Base Data'[flight_departure_datetime] ),
'Benchmark Group Base data'[flight_departure_datetime]
)
)
And the value is 13307
 
Measure 2 = 
CALCULATE (
COUNT ( 'Benchmark Group Base data'[dim_price_item_key] ),
'Benchmark Group Base data'[benchmarkgroup] = "Government",
TREATAS (
SUMMARIZE (
'Benchmark Base Data',
'Benchmark Base Data'[Ticket days grouping],
'Benchmark Base Data'[flight_departure_datetime],
'Benchmark Base Data'[International or Domestic]
),
'Benchmark Group Base data'[Group Ticket days grouping],
'Benchmark Group Base data'[flight_departure_datetime],
'Benchmark Group Base data'[International or Domestic]
)
)
and the value is 5871
 
Tagging people who helped in the past.  @parry2k  
1 REPLY 1
dax
Community Support
Community Support

Hi anushavikram,

I can't reproduce your design just based on your expression and description, so if possible, could you please inform me more detailed information(such as your sample data and your expected output)? Then I will help you more correctly.

Best Regards,
Zoe Zhi

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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