March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a visual with takes minutes to load… I am using 3 columns;
First column I am using this solution:
https://www.sqlbi.com/articles/handling-customers-with-the-same-name-in-power-bi/
Which is:
Name Unique =
VAR CustomersWithSameName =
CALCULATETABLE (
SUMMARIZE ( Customer, Customer[Customer Code], Customer[Name] ),
ALLEXCEPT ( Customer, Customer[Name] )
)
VAR Ranking =
RANKX ( CustomersWithSameName, Customer[Customer Code],, ASC, DENSE )
VAR Blanks =
REPT ( UNICHAR ( 8204 ), Ranking - 1 )
VAR Result = Customer[Name] & Blanks
RETURN
Result
The other 2 columns are
CALCULATE(
DISTINCTCOUNT(Fact[K_Parent_Customer])
,FILTER(Fact,Fact[Revenue] <> 0
)
)
And
CALCULATE(
DISTINCTCOUNT(Fact[K_Customer])
,FILTER(Fact,Fact[Revenue] <> 0
)
)
Why is it takig so long? is there perhaps another option to avoid the duplicates in the 1st column?
Hi @ovonel it could be part below as you filter Fact, which is not best practice. In addition, part <>0 in Fact table: usually if there is no Revenue in Fact then there is no related Customer, so it seems <>0 should be removed.
Try without Fitler part and see performance.
,FILTER(Fact,Fact[Revenue] <> 0
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
14 | |
10 | |
6 | |
5 |
User | Count |
---|---|
29 | |
23 | |
20 | |
13 | |
10 |