The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello , Everyone,
I need to create a measure of 3 product groups total sales and show it in chart and table.
Product Group A
Product Group B
Product Group C
The problem is that I need to represent those groups by different time period in the same month. (Runing total)
Group A (This Month)
Group B (Last 2 Months)
Group C (Last 3 Months)
For example I need to get a result showed in yellow background. :
I can't figure how to count a correct total. I can only get expected correct results , but with incorrect total. (Using like 4 sub measures).
I would be very thankful if someone will help me.
Solved! Go to Solution.
Here is one approach to do it:
Make a measure that uses switch to get your different calculations per group, and then a SUMX to get the right total.
Group Measure = SWITCH(SELECTEDVALUE(Table[Group]), "Group A", [Measure A], "Group B", [Measure B], "Group C", [Measure C], [Measure A])
Measure to use in Visual = SUMX(VALUES(Table[Group]), [Group Measure])
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Here is one approach to do it:
Make a measure that uses switch to get your different calculations per group, and then a SUMX to get the right total.
Group Measure = SWITCH(SELECTEDVALUE(Table[Group]), "Group A", [Measure A], "Group B", [Measure B], "Group C", [Measure C], [Measure A])
Measure to use in Visual = SUMX(VALUES(Table[Group]), [Group Measure])
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
User | Count |
---|---|
28 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |