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
Hi all,
i have a DAX measure that tags a status to the my customers.
Acct WinLoss =
Var cy = [Rev Current Year W/0 Scale]
var py = [Rev Prior Year W/0 Scale]
var ccy = [Count of Non-Zero Revenue Months]
var pcy = [Count of Non-Zero Revenue Months PY]
var cm = month(max('Calendar'[calendar_date]))
return
switch( true(),
cy >= 1000 && py = 0 && ccy>=2, "Acct Win",
cm = 10 && ccy =1 && py = 0 && cy >= 1000, "Acct Win",
cy=0 && py>= 1000 && pcy >=2, "Acct Loss",
cy >= 1000 && cy>=2 && py >= 1000 && pcy >=2, "Acct Retained",
cm = 10 && cy >= 1000 && ccy>=1 && py >= 1000 && pcy >=2, "Acct Retained",
BLANK()
)
To further add, the measures for
in a Matrix Visual, i have the following columns
product category | country | product group | customer name | count (Distinct) of customer name | Rev Current Year W/O Scale
i filter the matrix visual by placing the Acct WinLoss in and choosing the filter to contain "Win".
that way only my won accounts are seen. but the matrix visual is taking a long time to load. can anyone help me improve the visual loading performance? i used the performance analyser and it says that the DAX Query is the one causing the performance to be slow.
The number of account wins and losses can go up to around 200-300 accounts.
@learningOh
Please try this meaure. Take a look at your model and the other measures. This article will be helful:
Optimization guide for Power BI - Power BI | Microsoft Learn
Count of Non-Zero Revenue Months =
VAR fy =
MAX ( 'Calendar'[Fiscal_Year] )
RETURN
COUNTROWS (
FILTER (
ADDCOLUMNS (
SUMMARIZE (
FILTER ( 'InMarket Sales', [fiscal year] = fy ),
'Calendar'[calendar date day 1]
),
"NonZeroRevenue", SUM ( 'InMarket Sales'[USD @ Latest FY Bud] )
),
[NonZeroRevenue] > 0
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thank you for sharing this approach. it helped to cut down the time needed to load. is there any other method to further improve? the loading time is still slow
@learningOh
Optimizing the performance of a Power BI file requires a closer examination of the data model and measures. Without specific details, it's challenging to provide precise solutions. Various factors impact performance, such as data model complexity, connectivity mode (Import/DQ/AS), inefficient DAX measures, or suboptimal relationships. To offer tailored advice, I'd need more insights into your setup. Feel free to share specific aspects, and I can guide you more effectively.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |