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
Anonymous
Not applicable

wrong count of SSAS measure using import vs live connection

Hello all,

 

I need make changes to existing report( which is connected as Import query to SSAS model). While getting count of one of the measure, it is showing wrong values.

I have checked the same by creating a live connection where I am gettinig correct values, also correct values when connected to excel.

 
Measure used (using Import query)
Measure in SSAS model - Service[Transaction]
Count1 = CALCULATE( Count (Service[ Transaction])USERELATIONSHIP(Calendar[Date], Service[OpeningDate]))
 
Any pointers will be helpful?
4 REPLIES 4
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

USERELATIONSHIP(Calendar[Date], Service[OpeningDate]

You check if the table relationship in import mode is different from the model in SSAS.

It may be that the table model in import mode has changed.

 

Maybe you can refer to @MFelix 's formula.

 

Best regards,
Lionel Chen

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

Anonymous
Not applicable

Thanks for replying.

I tried using CountX but it gave same result as Count.

Regarding table relationship, I have there is calendar table created which is connected Opening date to Service table. This is inactive relationship. I have added other measure for which it is showing correct total.

Hi @Anonymous ,

 

Aggregating measures can easily lead to incorrect results because the measure is a dynamic value.
You may need to analyze the context of the measure before counting.

 

Best regards,
Lionel Chen

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

MFelix
Super User
Super User

Hi @Anonymous ,

 

Believe that you need to use a COUNTX that will count the number of measures you are having.

 

Something similar to:

Count1 =  COUNTX(Table, Service[Transaction])

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



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.