cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GuestUser Regular Visitor
Regular Visitor

DAX Query

Hi,

 

We have Power BI Report Server (May 2019) edition

 

Power BI is connected with datasource SSAS (COnnect Live Option) - we understand that edit queries (Power query) gets disabled -- So group by option cant be used

 

Can u please help me out to write DAX measures to achieve the following (The tables are already joined in SSAS)


select
B.type,
C.category,
sum(sales_amount)

from
fact A,
storedim B,
categorydim C

where A.store_wid = B.row_wid
and A.category_wid = C.row_wid

group by

B.type,
C.category,

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: DAX Query


@GuestUser wrote:

 

But the sales amount is showing incorrect - It is showing same values for all

it is not doing group by 

 


That typically indicates that there is not an active one to many relationship between the store and sales and category and sales.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: DAX Query

You should not need to do anything in Power Query for this. If the tables are already joined just dragging the type, category and sales amount onto a table visual should give you the same output as that SQL query.

GuestUser Regular Visitor
Regular Visitor

Re: DAX Query

Thanks for replying!!

 

But it is not working as expected!!

We have created Sum(Sales_Amount) measure

and dragged columns store_type , category and sum(sales_amount) on table visual

 

But the sales amount is showing incorrect - It is showing same values for all

it is not doing group by 

 

Any suggestions pls

 

 

Super User
Super User

Re: DAX Query


@GuestUser wrote:

 

But the sales amount is showing incorrect - It is showing same values for all

it is not doing group by 

 


That typically indicates that there is not an active one to many relationship between the store and sales and category and sales.

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Top Kudoed Authors
Users Online
Currently online: 356 members 4,036 guests
Please welcome our newest community members: