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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
PBIX_COACH
Helper II
Helper II

Distinct Count totaling in measure

Hello Friends

 

I need some help to get my total in column D to show as 2 and not 4

 

below is the formula I'm currently using which gives the correct count but not for the total.

 

Chat by week =
var vadeochat = CALCULATE([Video Chat Dt],USERELATIONSHIP('03 all-contacts'[Video Chat Date],'CalendarDim'[Date]))
return
     IF(
        ISINSCOPE(CalendarDim[Start of Week])=FALSE(),
        vadeochat,
        COUNTAX(SUMMARIZE(CalendarDim,CalendarDim[Start of Week],"__Value",vadeochat),[__Value]))

 

 

 

Screenshot 2023-01-15 203952.png

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, 

It is quite difficult without knowing how the data model looks like, but please try to write a new measure that looks something like below and add to the table visualization whether it suits your requirement.

 

Total fix measure: =
SUMX (
    SUMMARIZE (
        'FactTableName',
        'CalendarTable'[columnname that contains A],
        'TableName'[columnname that contains B]
    ),
    [Chat by week measure]
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi, 

It is quite difficult without knowing how the data model looks like, but please try to write a new measure that looks something like below and add to the table visualization whether it suits your requirement.

 

Total fix measure: =
SUMX (
    SUMMARIZE (
        'FactTableName',
        'CalendarTable'[columnname that contains A],
        'TableName'[columnname that contains B]
    ),
    [Chat by week measure]
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

thanks @Jihwan_Kim working now

PBIX_COACH
Helper II
Helper II

@Anonymous Tried it out and it's not working giving me the same result

 

Anonymous
Not applicable

Hello @PBIX_COACH  if column d is a measure 

Just create a mew measure:

 

Correct value = IF(HASONEVALUE(Table[Column A],[measure of column D],SUMX(VALUES(Table[Column A]),[measure of column D]))

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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