- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DAX Measures for Date while using Power BI Dataset
Hi, I am fairly new to Power BI.
I am using a dataset (Power BI dataset) as the source for my new report. I am trying to create a new measure using data calculations. Essentially, I have a column [Partner Deal Created Date] with date values: yyyy-mm-dd
I would like to add a measure column next to it with the previous month value (integer). Example ideal output:
Partner Deal Created Date | previousMonth |
2021-07-30 | 6 |
2021-06-30 | 5 |
2021-05-30 | 4 |
However whenever I try to perform a PREVIOUSMONTH (or just about any Date calculation for a measure), I get the following error when I add the measure to a table.
Formula:
Is this a limitation of using a Power BI dataset as the source or can this be achieved using a different formula?
My end goal is the be able to have a Measure as part of a slicer (which does not seem possible - I cannot add measures to slicers).
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous ,
Could you please share me with your pbix file after removing sensitive data?
Best Regards,
Eyelyn Qin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Anonymous ,
Based on my test
1. Connect to a Power BI dateset, and create [previousmonth] measure.
2. Create visuals on Power BI Desktop and publish the report to service. Both work fine on my side.
Did you create visuals firstly in Desktop? Is your Power BI Desktop the latest version?
3. It's not supported to apply measures to slicer.
4. When connect to a Power BI dateset , the connection mode is Live connection, we could not create calculated columns in this mode.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @v-eqin-msft ,
Thanks for writing! I succeeded to create the measure. However, I still get the error when trying to add it to a new visual (table) or existing table (visual). So unfortunately, I cannot even view the measured data (to confirm it is valid or not).
I created this in Power BI Desktop Version: 2.99.621.0 64-bit (November 2021) - I think the latest.
I am new to Power BI. I am using Live Dataset. What would the the negative impact if not Live Dataset?
Any thoughts on what this error means?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am creating measures. The option to create new columns or add tables are not there. I think this is because I am using a power bi dataset as my source.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
08-02-2024 04:36 AM | |||
Anonymous
| 05-23-2024 07:25 AM | ||
07-04-2024 12:20 AM | |||
06-05-2023 05:09 AM | |||
05-28-2024 03:35 AM |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |