Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
this is my sql query:
select count(Temperature) as TempUP, max([Date]) from Second_18FE34D47A8F$ where Temperature>25
group by [Date]
order by [Date]
same expression I want to write in DAX, till now I am done this:
EVALUATE
SUMMARIZE (
CALCULATETABLE (
Second_18FE34D47A8F,
FILTER ( Second_18FE34D47A8F, Second_18FE34D47A8F[Temperature] > 25 )
),
Second_18FE34D47A8F[Temperature],
Second_18FE34D47A8F[Date]
)
It produces this result, In DAX studio.(a few rows of result set)
Temperature | Date | |
33.2 | 09/11/2016 | |
33.5 | 09/11/2016 | |
33.6 | 09/11/2016 | |
32.1 | 09/11/2016 | |
32.5 | 09/11/2016 | |
32.4 | 09/11/2016 | |
33 |
|
I need only one count for one date, where to put count and order by in it?
Thanks for help.
Solved! Go to Solution.
Hi, @AnandRanga
Please try the formula below:
New Table = SUMMARIZE(
CALCULATETABLE (
Second_18FE34D47A8F,
FILTER ( Second_18FE34D47A8F, Second_18FE34D47A8F[Temperature] > 25 ) ),
Second_18FE34D47A8F[Date],
"Count",
COUNT(Second_18FE34D47A8F[Temperature])
)
Thanks,
Yuliana Gu
Hi, @AnandRanga
Please try the formula below:
New Table = SUMMARIZE(
CALCULATETABLE (
Second_18FE34D47A8F,
FILTER ( Second_18FE34D47A8F, Second_18FE34D47A8F[Temperature] > 25 ) ),
Second_18FE34D47A8F[Date],
"Count",
COUNT(Second_18FE34D47A8F[Temperature])
)
Thanks,
Yuliana Gu
User | Count |
---|---|
128 | |
109 | |
100 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |