Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi to all, i try to add a custom column from my two date fields Start and End, but after, i got an error:
Expression.Error: The value isn't a single-character string.
Details:
Value=202103
For create a custom column list i use this:
{Date.ToText([Start_Date__c], "yyyyMM")..Date.ToText([End_Date__c], "yyyyMM")}
If i use {Date.Month([Start_Date__c])..Date.Month([End_Date__c])}
it gives me correct month values but, i need yearmonth format like yyyyMM
Can someone help me?
My every row, it's a week with start and end dates, if week only in one month, i expected to see like 202105, if week start from one month and end on another, i expected to see 2 values, 202105, 202106
Solved! Go to Solution.
Solve my task with this code:
let
Test =
List.Distinct(List.Transform({[Start_Date__c],[End_Date__c]}, each Date.ToText(_, "yyyyMM")))
in
Test
Solve my task with this code:
let
Test =
List.Distinct(List.Transform({[Start_Date__c],[End_Date__c]}, each Date.ToText(_, "yyyyMM")))
in
Test
Glad to your problem has been solved. Thank you for sharing.
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |