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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sima_ue031
Helper I
Helper I

PowerBI Measure repeating rows

Hi, I make a measure to show lost customer, for example : a customer without revenue in date range. 
But, for customers how dont have a revenue they make a duplicate rows. How to exclude this repeat?

Screenshot_4.png
My measure : 

 

Sales Last period2 =
Var DatumOd = cALCULATE(MIN(Datum[Datum]),ALLSELECTED(Datum))
Var DatumDO = CALCULATE(MAX(Datum[Datum]),ALLSELECTED(Datum))
VAR RazlikaUDanima = DATEDIFF(DatumDO,Datumod-1,DAY)


RETURN
CALCULATE(
IF(
ISBLANK(SUM(OTP[Iznos linije (LVT)])),0,SUM(OTP[Iznos linije (LVT)])),
DATESINPERIOD(Datum[Datum],DatumDO,RazlikaUDanima,day)
 
)
8 REPLIES 8
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...

lbendlin
Super User
Super User

What is your expected result based on the sample data you showed?

You can see that my first comlumn and second repteat because my third colmn make this. I want to see only one row. 

Remove the trade column or use CONCATENATEX

Hello, i would explain.
I made a mesure to show 0 when i dont have sales in date range.
And now, i have a model :Customer and Division. Each customerno have only one division, you can see on table abowe my table where i want to show 0 for sales .

sima_ue031_0-1675760342458.png

 

And my customer no 00320 have a division AUTO. And i want to show only one row like this : 
CustomerNo    Division        Sales
00320               AUTO              0
I cant drop my column division because i need that. 

Power Query has no idea what division to pick in that scenario.  You need to provide the rules.  Would it always be AUTO? Would it be the first entry? Sorted by what?  Or would it be ok to pick a random value?

No, i have a relationship to dimension table division and each customer only have one division.

sima_ue031_0-1675699203764.png

Hello, i need only one row here, second colmn this is all division in division table, but my customer have only one division for example AUTO. 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors