Forum Discussion
Need Help Identifying Compaing Column Values
- Anonymous1 year ago
Hi cbruhn42 ,
I understand you're still facing the issue despite following the steps. Since I'm getting the expected output on my end,Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
If you want to have your question answered quickly and avoid many back and forth, you should read this excellent article with lots of useful tips.
Hi cbruhn42
Thank you for reaching out to Microsoft fabric community.
Try These steps -
Create a DateTimeAxis Table
DateTimeAxis =
VAR MinDate = MIN(MIN(TemperatureData[date time]), MIN(RejectData[Reject Date Time]))
VAR MaxDate = MAX(MAX(TemperatureData[date time]), MAX(RejectData[Reject Date Time]))
RETURN
ADDCOLUMNS (
CALENDAR (MinDate, MaxDate),
"Hour", HOUR([Date]),
"Minute", MINUTE([Date])
)
Create relationships as follows:
DateTimeAxis[DateTime] → TemperatureData[date time]
DateTimeAxis[DateTime] → RejectData[Reject Date Time]
Use single-direction, many-to-one relationships.
Create Measures individually -
AvgTemperature = AVERAGE(TemperatureData[Temperature])
TotalRejects = SUM(RejectData[Reject Count])
Use Line Chart
X-axis: Use DateTimeAxis with DateTime values.
Y-axis: Include both AvgTemperature and TotalRejects.
Please find the attached.pbix file for your reference.
Regards,
Sreeteja.
This feels like it's close. I created the date table, but for some reason it's not pulling in the time portion of the date/time columns.
Also, I don't want to look at the average temperature. I just want to chart the temperature and reject count against each other over time.
- Anonymous1 year agoNot applicable
Hi cbruhn42 ,
Date Table - Time portion
This issue typically occurs when Power BI automatically aggregates or groups data by date only.To resolve this, please verify that the DateTime column in your DateTimeAxis table is set to the Date/Time format, not just Date. In Data view, select DateTimeAxis[DateTime] and set the Data Type to Date/Time.
Within your chart's X-axis settings, set the Type to Categorical rather than Continuous. This approach ensures that exact timestamps are displayed, preventing automatic grouping into days or hours.
Chart actual temperatureIf you wish to chart each raw temperature reading over time, rather than an aggregated value, you do not need a measure. Simply drag TemperatureData[Temperature] to the Y-axis and DateTimeAxis[DateTime] to the X-axis. Similarly, you can add RejectData[Reject Count] to the Y-axis.
However, since Power BI only allows measures on a dual-axis, you may alternatively create two simple measures:
TemperatureRaw = MAX(TemperatureData[Temperature])
RejectCountRaw = MAX(RejectData[Reject Count])These measures will function as raw readings if your X-axis is sufficiently detailed, such as by minute.
Thank you.- cbruhn421 year ago
Helper III
So I checked and the DateAxis table has the column Date marked as a Date/Time and I've tried setting the x-axis to both categorical and continuous. Still having the same issue where nothing charts when I use Date on the x-axis and temperature on the y-axis.
- Anonymous1 year agoNot applicable
Hi cbruhn42 ,
To create the best visualization, use a Line Chart with DateTime on the X-axis:
Choose a Line Chart.
X-axis: date time (not DateAxis) directly onto the axis.
Y-axis: Temperature onto the axis.
Formatting:
Set the X-axis to Continuous.
Ensure the X-axis data type is set to Date/Time.