Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello all,
I create a custom column with using a switch function (below)
It works fine within the table, but when they are filtered by year, date, product type, and several other filters, they are no longer accurate as to its range. I think this is because the column created is on a per row basis, and it displays the first range from its list when summarized below.
I am thinking that a measure that will dynamically change based on the current revenue total showing is superior to a calculated column.
Is there a way to do this?
Here is the syntax for the column created:
Try to create a DAX measure and use that measure in the Table/Matrix visual.
Example
Revenue Range =
VAR __Revenue =
SUM ( 'Data'[Revenue ($k)] )
VAR __Range =
SWITCH (
TRUE (),
__Revenue < 500000, "<500K",
AND ( __Revenue >= 500000, __Revenue < 1000000 ), "500K-1M",
AND ( __Revenue >= 1000000, __Revenue < 2000000 ), "1M-2M",
AND ( __Revenue >= 2000000, __Revenue < 3000000 ), "2M-3M",
__Revenue < 3000000, "<Over 3M"
)
RETURN
__Range
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |