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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
VK7
Frequent Visitor

Multi usage measure

In a table, I have duplicate values, But I've to calcuate ignoring the duplicate.

In one chart need to dispaly the date (dd-mm-yy) wise and in another chart in Month mmm-yy.

1)In month, it is simple to have it without duplicate.
2) In Date, it should take sum without duplicate, and divide the value by 2.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @VK7 


Here I create a set of sample:

vzhengdxumsft_3-1719384130337.png

 

In Power Query, both-select Name and Date column and right-click, select Remove Duplicates.

vzhengdxumsft_0-1719383394817.png

Apply&Close

Then add 2 calculated table:

 

Table2  = SUMMARIZE('Table','Table'[Date],"_sum",SUM('Table'[Product Sold]))
Table 3 = 
VAR _vtable = SELECTCOLUMNS('Table','Table'[Date],'Table'[Product Sold],"Year/Month",FORMAT('Table'[Date],"MMM-YY"))
RETURN 
SUMMARIZE(_vtable,[Year/Month],"_sum",SUMX(FILTER(_vtable,[Year/Month]=EARLIER([Year/Month])),[Product Sold]))

The result is as follow:

 

vzhengdxumsft_1-1719384063214.pngvzhengdxumsft_2-1719384073615.png

 

 

Best Regards

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @VK7 

 

Actually that i can't understand your expression well.

The 2 Outputs seems too comfused, if possible, please share more detailed description of the outputs.

 

Best Regards

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

VK7
Frequent Visitor

I'm sorry for that, 

Output1: We need a chart with Proper date wise (dd-mm-yyyy) by sum of sales but distinct value. So if you look at the image the value for 20-06-24 is 4, cos of one duplicate value which i highlightd in red.
Output2: Same like output1 but isnstaed of proper date, need for only Monthly wise

To add few more details, its too large volume & we cant revome duplicate.

Anonymous
Not applicable

Hi @VK7 


Here I create a set of sample:

vzhengdxumsft_3-1719384130337.png

 

In Power Query, both-select Name and Date column and right-click, select Remove Duplicates.

vzhengdxumsft_0-1719383394817.png

Apply&Close

Then add 2 calculated table:

 

Table2  = SUMMARIZE('Table','Table'[Date],"_sum",SUM('Table'[Product Sold]))
Table 3 = 
VAR _vtable = SELECTCOLUMNS('Table','Table'[Date],'Table'[Product Sold],"Year/Month",FORMAT('Table'[Date],"MMM-YY"))
RETURN 
SUMMARIZE(_vtable,[Year/Month],"_sum",SUMX(FILTER(_vtable,[Year/Month]=EARLIER([Year/Month])),[Product Sold]))

The result is as follow:

 

vzhengdxumsft_1-1719384063214.pngvzhengdxumsft_2-1719384073615.png

 

 

Best Regards

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

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors