Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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:
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:
Then Power BI "decide" to work:
If anybody can help me, I really appreciate it
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.