Forum Discussion
How to remove last data point on visual? Difference between bar charts.
What I'm interested in plotting is the difference in hours between the blue columns which are shown in the line chart. I've tried two solutions but both don't seem to work. It says the x axis parameters can't be filtered or used in an if statement bc it's mixing text with numerals I think. Below is what I've tried.
| Date | Trailer-Head | Equip Hours | Services Performed | # S | # F | # O | # B | UPT S | UPT F |
| 8/31/2022 | 78-2 | 727 | Oil Sample Collected | 78-2.4 | 78-2.2 | 78-2.1 | 78-2.2 | 4 | 2 |
| 9/7/2022 | 78-2 | 723 | Filter Changed,Breather Changed | 78-2.4 | 78-2.1 | 78-2.1 | 78-2.1 | 4 | 1 |
| 9/15/2022 | 78-2 | 793 | Oil Sample Collected | 78-2.3 | 78-2.1 | 78-2.1 | 78-2.1 | 3 | 1 |
| 9/29/2022 | 78-2 | 968 | Oil Sample Collected | 78-2.2 | 78-2.1 | 78-2.1 | 78-2.1 | 2 | 1 |
| 10/1/2022 | 78-2 | 1013 | Oil Sample Collected | 78-2.1 | 78-2.1 | 78-2.1 | 78-2.1 | 1 | 1 |
| 10/2/2022 | 78-2 | 1015 | Oil Sample Collected,Oil Changed,Filter Changed,Breather Changed | 78-2 | 78-2 | 78-2 | 78-2 | 0 | 0 |
| UPT O | UPT B | sample.1 | filters.1 | oil.1 | breather.1 |
| 1 | 2 | 78-2 | |||
| 1 | 1 | 78-2 | 78-2 | ||
| 1 | 1 | 78-2 | |||
| 1 | 1 | 78-2 | |||
| 1 | 1 | 78-2 | |||
| 0 | 0 | 78-2 | 78-2 | 78-2 | 78-2 |
Another issue I haven't been able to solve is choosing the correct equip hours if there are two unique identifiers. For example, 78.2.4. Right now I have to either choose MIN, MAX, AVG which can lead to incorrect calcaulations. I would need to check the sample.1 column to see if blank or not.
Results
Feedback Type:
Frown (Error)
Timestamp:
2022-10-31T17:03:00.8174500Z
Local Time:
2022-10-31T12:03:00.8174500-05:00
Session ID:
f50486aa-726b-424e-aff6-800c51e600b9
Release:
September 2022
Product Version:
2.109.642.0 (22.09) (x64)
Error Message:
MdxScript(Model) (16, 11) Calculation error in measure 'Table1'[Measure]: DAX comparison operations do not support comparing values of type Date with values of type Text. Consider using the VALUE or FORMAT function to convert one of the values.
OS Version:
4 Replies
- lbendlinSuper User
You should not use a line chart visual if your data points do not have a temporal succession.
- bernaRegular Visitor
Right, it's going to be a bar chart on it's own.
- lbendlinSuper User
Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523