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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Wajahat_Kayani
Frequent Visitor

Creating report using single Dax

I want to create a report using single dax.

In dax i used different variablies like  

 

VAR category = VALUES(Orders[Category])

VAR sub_category = VALUES(Orders(sub-category])

VAR products = VALUES(Orders[Products])

VAR total_sales = SUMX(Orders , Orders[Sales])

VAR avg_sales = AVERAGEX(Ordres , Orders[Sales])

 

VAR result = ???? (I want to add all these VAR in result to show as report)

 

RETURN result 

2 REPLIES 2
amustafa
Super User
Super User

Are you talking about Calculation Groups?

See this video as an example: How to set up and use Calculation Groups in DAX | Power BI (youtube.com)

 

Can you privide a sample input and output in text format so it's easier to understand your requiremnts.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks @amustafa ,

 According to my knowledge Calculation Groups work with single dimension like 

CategoryTotal SalesAverage Sales
abc 5025

 

I am tring to create a report using single dax my expected result is :

CategorySub-CategoryProductTotal Sales Average Sales
Furnitureofficelma4522.5
abcpqrxyz5025

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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