Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have the sample DAX query above. Is there away i can manipulate 'Target_FormResponse'[Area Used] such that if it is blank or empty, i return "No" otherwise if its not blank or empty i return "Yes".
In SSRS, i can do something like =IIF(Len(Fields!Form_Response.Value) > 0,"Yes","No") but i want to achieve this at the DAX query level.
On a different but related note, is there also away i can get only the time part (exclude the date) from an SSAS datetime column in the sample DAX query above?
Solved! Go to Solution.
Hi @kadingo ,
We can use the following DAX to meet your requirement:
Table =
ADDCOLUMNS (
FILTER (
SUMMARIZE (
NATURALLEFTOUTERJOIN ( 'Target_Category', 'Target_Form' ),
'Target'[Area],
'Target'[id],
'Target'[Target date],
'Target'[Target Time Rage],
'Target_Category'[Origin],
'Target_Category'[Sectotion],
'Target'[Location],
'Target_Category'[Ethencity],
'Target_FormResponse'[Area Used],
'Target'[Description]
),
'Target'[id] = 111373268
),
"Area Used Column", IF ( ISBLANK ( [Area Used] ), "No", "Yes" )
)
We can try to use the Time Value function to get the time part of a Date/Time column
Time = TimeValue([Date])
Best regards,
Hi @kadingo ,
We can use the following DAX to meet your requirement:
Table =
ADDCOLUMNS (
FILTER (
SUMMARIZE (
NATURALLEFTOUTERJOIN ( 'Target_Category', 'Target_Form' ),
'Target'[Area],
'Target'[id],
'Target'[Target date],
'Target'[Target Time Rage],
'Target_Category'[Origin],
'Target_Category'[Sectotion],
'Target'[Location],
'Target_Category'[Ethencity],
'Target_FormResponse'[Area Used],
'Target'[Description]
),
'Target'[id] = 111373268
),
"Area Used Column", IF ( ISBLANK ( [Area Used] ), "No", "Yes" )
)
We can try to use the Time Value function to get the time part of a Date/Time column
Time = TimeValue([Date])
Best regards,
Try
IF(not(isblank(Target_FormResponse'[Area Used])),"Yes","No")
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin