Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
BrettBailey
Frequent Visitor

Adding a Dax measure to a report based on a shared data set.

Hi

 

I'm starting out with power bi and I'm a few days into a pro trial.

 

 

As some background info :

 

I have set up a fairly large datasource which I'm sharing from the workspace and the plan is for me and others to create many  seperate power bi reports and dashboards from that same datasource. The aim is  to prevent lots of copies of the huge datasource refreshing and putting undue load on the server.  All sounds great so far and I really like this feature of power BI.

 

 

The Problem

I've hit a number of issues this week trying to produce some of the reports in terms of formatting and filtering the data.  On googling the problem I usually end up on this website and the answer is almost always "Add a Flag / Measure in DAX".

 

When I try to follow along it seems that you cannot add a DAX field into a report this is using a shared dataset from power bi.  In the desktop app I can click "new measure" from the fields list but the form which pops up is unresponsive.

 

I would imagine that I could open up the original power bi file that has the shared data set and add a dax field in there but they really are report specific - I'm reluctant to populate a shared data-set with a bunch of visualisation-specific dax measures as this will cause longer term maintaince and dependency issues.

 

Is there another way?    

1 ACCEPTED SOLUTION
venal
Memorable Member
Memorable Member

@BrettBailey 

I tried to re-pro the issue from my end.

Report-1(New Measure).JPG

Added New Qucik Measure in the above report.

Tried to connect to the above on with Power BI Dataset and created a new measure, please check with the "salary" measure column.

Report-2(New Measure)-Measure Added.JPG

I am using August-2019 Power BI Desktop.

May i know the desktop version you are currently using.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more

If this post was helpful may I ask you to mark it as solution and give it some kudos?

View solution in original post

3 REPLIES 3
venal
Memorable Member
Memorable Member

@BrettBailey 

I tried to re-pro the issue from my end.

Report-1(New Measure).JPG

Added New Qucik Measure in the above report.

Tried to connect to the above on with Power BI Dataset and created a new measure, please check with the "salary" measure column.

Report-2(New Measure)-Measure Added.JPG

I am using August-2019 Power BI Desktop.

May i know the desktop version you are currently using.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more

If this post was helpful may I ask you to mark it as solution and give it some kudos?

@venal Thank you for taking the time to look at this, much appreciated.

 

Having seen your examples I have tried again and have made some progress but havent really solved the problem.

 

I'm using October 2019 version of BI desktop.

 

It seems I can add a measure so long as it doesnt reference the dataset. For example based on your screen shots if I added a measure such as:

 

Bonus = 'EMP'[Sal] 

 

it doesnt work - the measure creates but there is no intellisense when entering the DAX and if it is added to a visualisation then the visualisation shows an error.

 

If a Add a measure which doesnt access that data it works fine.  eg

 

Bonus = 500

 

this can be added to visualisations but is of very limited use.

 

In your tests is 'Salary' based on fields from the Emp  Data source?  

 

 

I've done some more testing following a full reboot and I'm now able to add a measure.  I think the issue is a combination of needing a reboot (when I first posted the measure = 100    test didnt even work) and and that I hadn't realised that calcualted columns and measures where not the same thing in power bi.

 

I Will mark @venal answer as accepted as following it led me to the fix. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors