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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
SebastianY
Regular Visitor

It seems like PowerBI simply don't want to work

Hi everyone

 

I've been having a problem that I can't solve (and yes, I've already asked Chat GTP).

 

My problem is the following:

 

I have this DAX formula:

 

 

 

Ventas con Otros =

VAR PorcSales = [TotalSales] * 0.01

//I create a summarize the table with customers and the their total sales
VAR SumTable =
SUMMARIZE(SALES, 'MY TABLE'[NAME], "CustomerSales", [TotalSales]
)

//Then I use a filter to select only those customers whose purchases is below the 1% of Total Sales.
VAR FilterSumTable =
FILTER(SumTable , [CustomerSales] < PorcSales )

VAR TotalOthers=
CALCULATE(
[TotalSales],
FilterSumTable
)

VAR SelectOthers = SELECTEDVALUE('MY TABLE'[NAME]) = "Others"

RETURN

IF(SelectOthers,TotalOthers,[TotalSales])

 

 

 

 

What I want to achieve is to make a pie graf that shows every single customer whose purchases represent more than 1% of the total sales, the rest I want to group them under the name "others" and assign them the remaining value.

 

If I try to do a table with that information, I get this:

 

Ejemplo 1.PNG

 

As you may see, there is no "Other" row.

 

How ever, if i replace the variable with any value then yes it works.

For Example:

IF(SelectOthers,1000000,[TotalVentas])
 

 

Then Power BI "decide" to work:

ejemplo 2.PNG

 

If anybody can help me, I really appreciate it

0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.