The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
In certain conditions, the tooltips seems to generate a cartesian product when you use the line and chart column tooltip.
Steps to reproduce the bug
SampleData =
VAR StartDate = DATE(2024, 12, 1)
VAR EndDate = DATE(2025, 3, 31)
VAR DateRange = DATEDIFF(StartDate, EndDate, DAY)
RETURN
UNION(
SELECTCOLUMNS(
GENERATESERIES(1, 500, 1), // This generates our 500 rows
"Ticket Number", "D" & FORMAT(MOD([Value] - 1, 101), "000"), // "D000" to "D100" repeated
// Calculate a consistent Creation Date based on the Ticket Number itself
"Creation Date",
VAR TicketIndex = MOD([Value] - 1, 101) // Gets the index 0-100 for the current ticket
RETURN
StartDate + MOD(TicketIndex, DateRange + 1) + (INT(TicketIndex / (DateRange + 1)) * RANDBETWEEN(0, 100)) / (24*60*60),
// The above line calculates a fixed date for each TicketIndex, ensuring consistency
"Last Actualisation Date",
// Ensure Last Actualisation is after or equal to Creation Date
// We need to recalculate the specific CreationDate for the current row's TicketNumber
VAR CurrentTicketIndex = MOD([Value] - 1, 101)
VAR CurrentTicketCreationDate = StartDate + MOD(CurrentTicketIndex, DateRange + 1) + (INT(CurrentTicketIndex / (DateRange + 1)) * RANDBETWEEN(0, 100)) / (24*60*60)
RETURN
CurrentTicketCreationDate
+ RANDBETWEEN(0, 90) // Add 0 to 90 days to creation date for last actualisation
+ RANDBETWEEN(0, 86399) / (24*60*60), // Add random seconds for time component
"Status", "In Progress"
),
SELECTCOLUMNS(
GENERATESERIES(1, 100, 1), // This generates our 500 rows
"Ticket Number", "D" & FORMAT([Value], "000"), // "D000" to "D100" repeated
// Calculate a consistent Creation Date based on the Ticket Number itself
"Creation Date",
VAR TicketIndex = [Value]-1 // Gets the index 0-100 for the current ticket
RETURN
StartDate + MOD(TicketIndex, DateRange + 1) + (INT(TicketIndex / (DateRange + 1)) * RANDBETWEEN(200, 300)) / (24*60*60),
// The above line calculates a fixed date for each TicketIndex, ensuring consistency
"Last Actualisation Date",
// Ensure Last Actualisation is after or equal to Creation Date
// We need to recalculate the specific CreationDate for the current row's TicketNumber
VAR CurrentTicketIndex = [Value]-1
VAR CurrentTicketCreationDate = StartDate + MOD(CurrentTicketIndex, DateRange + 1) + (INT(CurrentTicketIndex / (DateRange + 1)) * RANDBETWEEN(200, 300)) / (24*60*60)
RETURN
CurrentTicketCreationDate
+ RANDBETWEEN(0, 90) // Add 0 to 90 days to creation date for last actualisation
+ RANDBETWEEN(0, 86399) / (24*60*60), // Add random seconds for time component
"Status", "Closed"
))
Row Count = COUNTROWS(SampleData)
Unique ticket = DISTINCTCOUNT(SampleData[Ticket Number])
X-Axis : Month from the hierarchy generated by default
Y-Axis : Row count
Column legend : Status
Small multiples : Year from the hierarchy generated by default
Tooltips : Row Count & Unique Ticket
If you place Row Count first in the tooltip, the resultat is wrong (50 unique ticket in march 2025 with the "In progress" status).
If you place Unique ticket first in the tooltip, the result seem OK (11 unique ticket in march 2025 with the "In progress" status)Row Count First incorrect value
Row Count Last correct value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.