Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have a Table (Table1) with this columns (Time, shop, Start_time, End_Time) and a secund table (Table2) with the this columns (Time, shop, Sales). I'm making a dashboard that use the Table1 to filter a time series chart (Table2) for each shop between Start_time, and end_time. I need that each time that I press in a row in the Table1 the Time series chart change showing the time series with the time between (start_time, End_Time) for each shop.
Thanks a lot
Solved! Go to Solution.
Hi @afva_2000
Create below measure and put it into the line chart's filter pane as a filter field. Set it to show items when value is 1.
TimeFlag =
var vStartTime = SELECTEDVALUE(tabla_pbi[start_time])
var vEndTime = SELECTEDVALUE(tabla_pbi[end_time])
var vTime = SELECTEDVALUE(super_tabla[Time])
return
if(HASONEVALUE(tabla_pbi[start_time]), if(vStartTime<=vTime && vEndTime>=vTime, 1, 0), 1)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @afva_2000
Create below measure and put it into the line chart's filter pane as a filter field. Set it to show items when value is 1.
TimeFlag =
var vStartTime = SELECTEDVALUE(tabla_pbi[start_time])
var vEndTime = SELECTEDVALUE(tabla_pbi[end_time])
var vTime = SELECTEDVALUE(super_tabla[Time])
return
if(HASONEVALUE(tabla_pbi[start_time]), if(vStartTime<=vTime && vEndTime>=vTime, 1, 0), 1)
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
@afva_2000 , Try a measure like this
sumx(filter(Table2,Table2[Shop] = max(Table1[Shop]) && Table2[time] >= min(Table1[Start time]) && Table2[time] <= max(Table1[End time])), calculate(sumx(values(Table2[Shop]), calculate(sum(Table2[Sales])))))
if this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
It didn't work, I created the measure in Table1, it didn't work, Then tried in table2, and in both and the results were the same.
I put a Sample data and pbi example here
Dashboard pics (nothing happens, when yuou press on the table1 :
I just want that the time series show me the shops between this two dates (start_time, end_time). in SQL it would be more or less
Select
b.Time,
b.Shop,
b.Sales
from table2 as b inner join table1 a on
a.start_time <= b.Time and
a.end_time >= b.Time;
Thanks a lot!!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |