- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Minimum across column
Hi all,
I have a table in visualization as below:
Customer | Sales | Quantity | Avg Sales | Discount | Net Sales | Sales cat | Quantity cat | Net Sales cat | Customer category |
A | 4000 | 20 | 200 | 15 | 3985 | 0 | 1 | 0 | 0 |
B | 3000 | 5 | 600 | 10 | 2990 | 1 | 3 | 1 | 1 |
C | 1000 | 25 | 40 | 5 | 995 | 2 | 0 | 2 | 0 |
D | 500 | 10 | 50 | 1 | 499 | 3 | 2 | 3 | 2 |
*Net Sales = Sales - Discount (Discount is from other table)
Sales cat, Quantity cat and Net Sales cat are based from Sales, Quantity and Net Sales value.
What I want is to get the Customer category. Customer category is based on the minimum among Sales cat, Quantity cat and Net Sales cat.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous
Try this
Customer Category = MIN ( MIN ( SELECTEDVALUE ( [Quantity Cat] ), SELECTEDVALUE ( [Sales Cat] ) ), [Net Sales Cat] )
Regards
Zubair
Please try my custom visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous
What if you use Min Function as Measure
Customer Category = MIN ( [Quantity Cat], [Sales Cat] )
Regards
Zubair
Please try my custom visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, @Zubair_Muhammad I have left out one more element, which customer category is based on the minimum of sales cat, quantity cat and net sales cat.
I have tried the MIN in measure. But I have an error message 'A single value for column 'net sales cat' in table A cannot be determined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous
Are " sales cat, quantity cat and net sales cat" measures or calculated columns?
MIN allows only 2 arguments..so you can wrap a MIN function inside another MIN
Customer Category = MIN(MIN([Quantity Cat],[Sales Cat]),[Net Sales Cat])
See the attached sample file
Regards
Zubair
Please try my custom visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't do that because sales cat, quantity cat and net sales cat are from different table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Zubair_Muhammad, sales cat and quantity cat are new column while net sales cat is new measure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Anonymous
Try this
Customer Category = MIN ( MIN ( SELECTEDVALUE ( [Quantity Cat] ), SELECTEDVALUE ( [Sales Cat] ) ), [Net Sales Cat] )
Regards
Zubair
Please try my custom visuals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
05-17-2024 12:38 PM | |||
06-26-2024 09:04 AM | |||
10-06-2024 08:41 AM | |||
Anonymous
| 05-14-2024 06:32 AM | ||
07-10-2024 10:21 AM |
User | Count |
---|---|
105 | |
75 | |
44 | |
39 | |
33 |
User | Count |
---|---|
165 | |
90 | |
65 | |
46 | |
43 |