I am relatively new to Power BI and currently working on creating a graphic that visualizes the registration year of cars based on their license plates.
For instance, I have license plates ranging from "AF-600-AA" to "AF-770-AA," this plates represent cars registered between October 2022 and January 2023.
I want to show a graphics bar with the cars of X registration year count
In SQL, I would achieve this using a query like:
SELECT * FROM vehicle WHERE plate BETWEEN "AD000AA" AND "AD400AA";
However, I am unsure how to apply a similar filter in Power BI to display this information in a bar chart. Can someone guide me on how to achieve this in Power BI?
Thank you!
You can do similar search between in PBI. Here is a DAX example via a Calculated Column:
You could add a Calculated Column to your table with a
SWITCHsimilar to:You may also want to do this in PowerQuery before the data loads into the dataset. Same concept applies.