Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi.
I have an application for Energy measurements using Pbi Desktop and I need to shown four values visuals, as follows:
- Max Demand OutTime and Data&Time of Max Demanda OutTime:
Demand Max OutTime = CALCULATE([Demand Max];FILTER(fEnergy; RELATED(dTime[Hour])< TIMEVALUE("19:00") || RELATED(dTime[Hour])> TIMEVALUE("22:00")))
Demand Max OutTime (hh:mm) = CALCULATE(SELECTEDVALUE(fEnergy[Date&Time]); FILTER(fEnergy; RELATED(dTime[Hour])< TIMEVALUE("19:00") || RELATED(dTime[Hour])> TIMEVALUE("22:00")); FILTER(fEnergy; fEnergy[Demand]= MAX(fEnergy[Demand])))
- Max Demand InTime and Data&Time of Max Demanda InTime:
Demand Max InTime = CALCULATE([Demand Max];FILTER(fEnergy; RELATED(dTime[Hour])>= TIMEVALUE("19:00") && RELATED(dTime[Hour])<= TIMEVALUE("22:00")))
Demand Max InTime (hh:mm) = CALCULATE(SELECTEDVALUE(fEnergy[Date&Time]); FILTER(fEnergy; RELATED(dTime[Hour])>= TIMEVALUE("19:00") && RELATED(dTime[Hour])<= TIMEVALUE("22:00")); FILTER(fEnergy; fEnergy[Demand] = MAX(fEnergy[Demand])))
The first two values are shown correctly but the second two values are not. Please if someone can help me why the second two measures are not ok. I have put the measures attached.
I have already tried to use CALCULATETABLE () but without success. I do not know how to filter using command FILTER ( ) the data already filtered by the CALCULATETABLE. I have tried this:
Demand Max InTime(hh:mm). = CALCULATE(SELECTEDVALUE(fEnergy[Date&Time]);FILTER(CALCULATETABLE(fEnergy; FILTER(fEnergy; RELATED(dTime[Hour])>= TIMEVALUE("19:00") && RELATED(dTime[Hour])<= TIMEVALUE("22:00"))); fEnergy[Demand] = MAX(fEnergy[Demand])))
tks,
Berg
Solved! Go to Solution.
Hi @aBerg
I changed your measure Demand Max InTime(hh:mm) Test as follows:
Hi @aBerg
Please share the pbix in OneDrive or Google Drive and paste the link here. Also let me know the output expected.
Cheers
CheenuSing
Hi @CheenuSing
Thanks for reply.
PBIX link: https://1drv.ms/u/s!Ag06VMKBGvfCgiuHXDCMkvNrnHWa
I need to show in the four fields indicated in the image attached the largest (max) value of the column "Demand" and the time that occured within two periods: one "00:00 to 19:00 and 22:00 to 00:00" (blue period) and another one "19:00 to 22:00" (yellow period):
1. In the first field I need the highest (max) value of the "demand" column within the period from 00:00 (00:00 am) to 19:00 (07:00 pm) and 22:00 (10:00 pm) to 00:00 (00:00 am) - blue period.
2. In the second field I need to show at what time this highest (max) value of the "demand" column occurred within the blue period (item 1.).
3. In the third field I need the highest (max) value of the "demand" column within the period from 19:00 (07:00 pm) to 22:00 (10:00 pm) - yellow period.
4. In the fourth field I need to show at what time the highest (max) "demand" column value occurred within the yellow period (item 3.). The first three fields worked, but the fourth field did not (blank field).
Thanks !
Hi @aBerg
I changed your measure Demand Max InTime(hh:mm) Test as follows:
Hi @CheenuSing !
Thanks for your very helpful help.
I gave you one KUDO, if it's possible I´d give more ...
Greetings.
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |