This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
I have created a calculated column with the below DAX, it doesn't show error but not showing data.
TimeCategory =
IF (
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] = TIME (00,00,00),
"Midnight",
IF (
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] = TIME (04,00,00),
"EarlyMorning",
IF (
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] = TIME (08,00,00),
"Morning",
IF (
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] = TIME (12,00,00),
"Noon",
IF (
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] = TIME (16,00,00),
"Evening",
IF (
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] = TIME (20,00,00),
"Night"
)
)
)
)
)
)
@RashmiRGowda Verify that your Time (bins) column is set to a Time data type and not anything else. Also, I would use SWITCH instead of nested IF statements. I created a mock-up of this and was able to get your code to work just fine. Could potentially try something like:
Column =
SWITCH( TRUE(),
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] < TIME (04,00,00), "Midnight",
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] < TIME (08,00,00), "EarlyMorning",
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] < TIME (12,00,00), "Morning",
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] < TIME (16,00,00), "Noon",
'Onyx Data -DataDNA Dataset Chal'[Time (bins)] < TIME (20,00,00), "Evening",
"Night"
)
PBIX is attached below signature.
Try using a switch statement...eg)
TimeCategory =
SWITCH( TRUE() ,
[TImeBins] = TIME( 12, 00, 00 ) , "Noon" ,
[TImeBins] = TIME( 00, 00, 00 ) , "Midnight" ,
etc... ,
BLANK()
)
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 32 | |
| 23 | |
| 22 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 41 | |
| 27 | |
| 22 | |
| 20 |