Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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 @Anonymous 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!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |