Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I think that the issue is how the TREATAS function is used for "Group" because it is attempting to filter the Location column in Consolidated (2) for "Hong Kong", "Singapore", and "Shanghai". However, when "Group" is selected, the TREATAS might not properly evaluate the aggregated locations.
You need to handle the "Group" selection explicitly by summing all locations without filtering:
SelectedCurrency = "USD" && SELECTEDVALUE(Revenue[Location]) = "Group",
CALCULATE(
SUM('Consolidated (2)'[Amount Invoiced (USD)])
),consol Amount =
VAR SelectedCurrency =
SWITCH(
TRUE(),
SELECTEDVALUE(Revenue[Location]) = "Group" || ISBLANK(SELECTEDVALUE(Revenue[Location])), "USD",
SELECTEDVALUE(Revenue[Location]) = "Hong Kong", "HKD",
SELECTEDVALUE(Revenue[Location]) = "Singapore", "SGD",
SELECTEDVALUE(Revenue[Location]) = "Shanghai", "CNY",
BLANK()
)
VAR Amount =
SWITCH(
TRUE(),
SelectedCurrency = "USD" && SELECTEDVALUE(Revenue[Location]) = "Group",
CALCULATE(
SUM('Consolidated (2)'[Amount Invoiced (USD)])
),
SelectedCurrency = "USD",
CALCULATE(
SUM('Consolidated (2)'[Amount Invoiced (USD)]),
TREATAS({"Hong Kong", "Singapore", "Shanghai"}, 'Consolidated (2)'[Location])
),
SelectedCurrency = "HKD",
CALCULATE(SUM('Consolidated (2)'[Amount Invoiced (USD)]),
TREATAS({"Hong Kong"}, 'Consolidated (2)'[Location])),
SelectedCurrency = "SGD",
CALCULATE(SUM('Consolidated (2)'[Amount Invoiced (USD)]),
TREATAS({"Singapore"}, 'Consolidated (2)'[Location])),
SelectedCurrency = "CNY",
CALCULATE(SUM('Consolidated (2)'[Amount Invoiced (USD)]),
TREATAS({"Shanghai"}, 'Consolidated (2)'[Location])),
BLANK()
)
RETURN
AmountCreate a measure to dynamically calculate the top 5 clients based on total revenue:
Top 5 Clients Revenue =
CALCULATE(
[consol Amount], -- Assuming this is the main measure
TOPN(5, VALUES('Clients'[Client Name]), [consol Amount], DESC)
)This happens because you only have one data point for the year "2024."
You can add dummy data for example, you can add rows with zero values for each month or quarter.
or you modify your measure to fill gaps with previous data:
Fill Gaps Measure =
IF(
ISBLANK([consol Amount]),
CALCULATE(
[consol Amount],
FILTER(
ALL('Date'),
'Date'[Date] < MAX('Date'[Date])
)
),
[consol Amount]
)If adding data points isn't possible, you can use a "smoothed" line chart or consider a different visualization that does not depend on continuous data (like a bar chart).
Thank you.
Q1 solved.
Q2 supposed based on Q1+Year 2024 only = Top 5 list.
their trend suppose shown from 2020-2024
Q3. May I ask what is a dummy data? I have 4 categories in Year 2024, and they share the same amount of line y-axis based on location.
For eg, Group is 40%, Hong Kong is 27%, Shanghai ... Singapore ...But they are not different by the y-axis categories
Can you clarify more your questions regarding Q2 and Q3? if possible can you share some data please?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 70 | |
| 50 | |
| 42 | |
| 40 |