The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
83 | |
83 | |
37 | |
34 | |
32 |
User | Count |
---|---|
92 | |
79 | |
62 | |
53 | |
51 |