Your Power BI model ingests an Orders table from a legacy source where the OrderID encodes the order date as yyyymmdd-xxxx (for example, 20230115-0421). You must let report developers use DAX time-intelligence functions such as TOTALYTD against order revenue. The data source cannot be modified. In the model, what should you do?
Use a quick measure that calls TOTALYTD after wrapping OrderID in VALUE and LEFT functions each time the measure is used.
Create a calculated column in Orders that parses the first eight characters of OrderID into a Date data type and use that column in relationships and measures.
Build a calculated table that aggregates Orders by the encoded date and relate it to the Orders table with a one-to-many relationship.
Enable the Auto date/time option so Power BI automatically creates a hidden date table from the OrderID column.
Time-intelligence functions work only with columns that have the Date or Date/Time data type. Because OrderID is a text field, Auto date/time cannot create a hidden date table from it, and every measure that parses the string on demand would be inefficient and error-prone. Aggregating the table into a separate calculated table still leaves the original text value unchanged and therefore would not satisfy the data-type requirement. Creating a calculated column that extracts the first eight characters of OrderID and converts them to a true date value produces a reusable, typed column that can participate in relationships or be referenced directly by TOTALYTD and other time-intelligence functions.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is it necessary to convert the OrderID into a Date data type for using time-intelligence functions in Power BI?
Open an interactive chat with Bash
What does a calculated column do in Power BI, and why is it useful in this scenario?
Open an interactive chat with Bash
Why is Auto date/time not a viable option for this case?
Open an interactive chat with Bash
Microsoft Power BI Data Analyst
Model the Data
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .