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 community,
I have the following challenge:
With a dataset like this:
Aviso | Date IN | Date Out | Texto código del problema |
305050015 | 02/03/2018 | 02/03/2018 | Plataforma telefónica |
305183990 | 02/03/2018 | 03/03/2018 | Buzón de correo electrónico |
305183991 | 02/03/2018 | 03/03/2018 | Plataforma telefónica |
305183992 | 02/03/2018 | 05/03/2018 | Plataforma telefónica |
305183993 | 02/03/2018 | Plataforma telefónica | |
305183994 | 04/03/2018 | 07/03/2018 | Plataforma telefónica |
305184005 | 05/06/2018 | Plataforma telefónica |
I need to create a Slicer showing:
-Number of "Avisos" per Date IN.
-Number of "Avisos" per Date OUT.
-Accumulative number of "Avisos" IN per day.
-Accumulative number of "Avisos" OUT per day.
-Difference between Accumulative number of Avisos IN and OUT.
Thank you in advance.
Solved! Go to Solution.
Hi Alex,
First in the edit query unpivot Date IN & Date OUT column, which will result in the below table:
Then make a summarised columns which only contains date:
Date = SUMMARIZE(Table1,Table1[Value])
Link this table and the main table on value (Date column)
Make two columns for date in & out count:
IN = CALCULATE(COUNT(Table1[Attribute]),Table1[Attribute]="DATE In")
OUT = CALCULATE(COUNT(Table1[Attribute]),Table1[Attribute]="DATE OUT")
Finally create two measures for running total and then take the difference for the last column.
IN running total in Value =
CALCULATE(
SUM('Date'[IN]),
FILTER(
ALLSELECTED('Date'[Value]),
ISONORAFTER('Date'[Value], MAX('Date'[Value]), DESC)
)
)
OUT running total in Value =
CALCULATE(
SUM('Date'[OUT]),
FILTER(
ALLSELECTED('Date'[Value]),
ISONORAFTER('Date'[Value], MAX('Date'[Value]), DESC)
)
)
Difference = [OUT running total in Value]-[IN running total in Value]
Regards,
Saurabh Kedia
@ALEX13,
Could you please describe more details about your scenario? What field do you use to create slicer?
For those blank Date Out values, how do you display the number and accumulative numbers of "Avisos"? Moreover, about the last requirement (Difference between Accumulative number of Avisos IN and OUT), what data would you like to show?
Regards,
Lydia
Please tell me if you need more details.
thank you very much in advance.
Hi Alex,
First in the edit query unpivot Date IN & Date OUT column, which will result in the below table:
Then make a summarised columns which only contains date:
Date = SUMMARIZE(Table1,Table1[Value])
Link this table and the main table on value (Date column)
Make two columns for date in & out count:
IN = CALCULATE(COUNT(Table1[Attribute]),Table1[Attribute]="DATE In")
OUT = CALCULATE(COUNT(Table1[Attribute]),Table1[Attribute]="DATE OUT")
Finally create two measures for running total and then take the difference for the last column.
IN running total in Value =
CALCULATE(
SUM('Date'[IN]),
FILTER(
ALLSELECTED('Date'[Value]),
ISONORAFTER('Date'[Value], MAX('Date'[Value]), DESC)
)
)
OUT running total in Value =
CALCULATE(
SUM('Date'[OUT]),
FILTER(
ALLSELECTED('Date'[Value]),
ISONORAFTER('Date'[Value], MAX('Date'[Value]), DESC)
)
)
Difference = [OUT running total in Value]-[IN running total in Value]
Regards,
Saurabh Kedia
HI Lydia,
I would like to obtain the following result:
IN | OUT | Accumulative IN | Accumulative OUT | Difference (Accumulative) | |
02/03/2018 | 5 | 1 | 5 | 1 | -4 |
03/03/2018 | 2 | 5 | 3 | -2 | |
04/03/2018 | 1 | 6 | 3 | -3 | |
05/03/2018 | 1 | 1 | 7 | 4 | -3 |
07/03/2018 | 1 | 7 | 5 | -2 |
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 |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |