Reply
Topic Options
- 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
End of the Input Error
01-08-2023
09:29 AM
Hello:
I am trying to caculate the remainder of the row using DAX:
Remainder =
VAR longest_bar = CALCULATE ( MAX ( Companies[Total]), ALL (Companies ) )
RETURN( longest_bar - MAX (Companies[Total]] ) )/2
I keep running into a 'End of the Input' error. How can I correct this error? Any help would be much appreciated. Thanks in advance.
Solved! Go to Solution.
1 ACCEPTED SOLUTION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2023
09:41 AM
@isam2003 Try this:
Remainder =
VAR longest_bar = CALCULATE( MAX(Companies[Total]), ALL(Companies ) )
RETURN
DIVIDE( longest_bar - MAX(Companies[Total]), 2)
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2023
09:41 AM
@isam2003 Try this:
Remainder =
VAR longest_bar = CALCULATE( MAX(Companies[Total]), ALL(Companies ) )
RETURN
DIVIDE( longest_bar - MAX(Companies[Total]), 2)
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...

Helpful resources
Announcements
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 - February 2025
Check out the February 2025 Power BI update to learn about new features.

Recommendations
Subject | Author | Posted | |
---|---|---|---|
06-21-2023 09:42 AM | |||
12-15-2024 05:04 AM | |||
02-09-2023 05:54 AM | |||
11-29-2024 07:22 AM | |||
11-26-2024 01:56 AM |
Top Solution Authors (Last Month)
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
9 |
Top Kudoed Authors (Last Month)
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
10 |