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

The total of a measure does not work

Hi all,

 

I have a Customer Judgement code like below, which calculate and compare its Revenue for L12M and L12MLY, for making the Customer judgement. (Revenue inside below is also a measure)

 

YihaoSun_0-1624552285659.png


This part of code above works well, following my data validation, which is good. And then I wanna do a counting about how many "New" Customer do I have in this case, so I wrote a measure called "Tik1", whose code is like below:

 
YihaoSun_1-1624552688531.png

 

 

And then after put them both into the PowerBI matrix, you can see the matrix like below:

YihaoSun_2-1624552835882.png

In each row it represents an unique Customer, the measure [RealMovement] can have a correct judgement, and [Tik1] can actually recognize it as 1. But when we check the total of the [Tik1], we realize that it is not even doing the sum-up at all...., which is my major problem..

I see the challeague of this is from two perspectives:
first of all, I am trying to do a counting when my [meausre] statisfying a condition (in my case is equal to "New"), I dont know if this is possible, no matter is using the COUNTROWS function directly, or like me using a [Tik1] measure to achieve that.

Secondly, if you observe the Total, it actually has a "Growing" for the whole pattern, whcih probably mulfunctions the Total of my [Tik1] measure.


I have been stuck at this issue for couple days, hope the mighty PowerBI community can help me with this. Any adviuces or info will be appreciated. Thanks in advance 🙂

 

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Try with all columns in row

 

Change your return as

sumx(summarize(Table, Table[Customer Name], Table[Date], "_1" , <Your return>),[_1])

 

In place of date you can add year, qtr etc

 

also check

https://www.youtube.com/watch?v=ufHOOLdi_jk

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi Amitchandak,

 

I also did another try in the [RalMovement_New] like below:

YihaoSun_0-1624614485902.png

The reason why I added-up this CALCULATETABLE, is because outside this measure, I have limited my time to May 2021, so by using the ALL function insdie I can realease the limit of the May 2021, and then make my calculation right. And then I remain what I have in the [SUM_Tik1], and then put them all into the Powerbi matrix like below:

YihaoSun_1-1624614687135.png

Now you can see both the previous and current [RealMoavement] [RealMovement_New] are working well, and the same as [Tik1], but when check the [SUM_Tik1],you can see it goes so wrong... Feels like the Movement ( [RealMovement] measure) and the Counting ([SUM_Tik1] measure) can not be wroking at the same time, which is truly weird...

Anonymous
Not applicable

Hi Amitchandak,

Thanks so much for the reply! I have tried it for my 'RealMovement' measure as what you mentioned:

 

YihaoSun_3-1624612131127.png

 

,along with the new SUM_Tik1 measure as below:

YihaoSun_4-1624612260131.png

 

, since in my case the "RealMove" will be outputed as a string, so here I use the MAXX instead. And then after I put it into the report, it shows as:

YihaoSun_5-1624612394194.png

 

The [RealMovement] is the previous measure, which is the ground truth of the Movement Label. And for the [RealMovement_New], it can only recognize part of the customers and then give the correct Movement Label, but for most of the other customers, it just gave a Blank... But on the other hand, this time, the [SUM_Tik1] measure can recognize all the "New" label, and gave a correct sum-over basing on the incomplete Movement Label...

 

I see this one truly as a process, at least now the sum-over can be done correctly... But just also need to figure out why the [RealMovement_New] can only recognize part of the customers.

 

 

 

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.