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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

FILTER BY DIFFERENT PRODUCTS, APPLY THE WHAT IF AND SUM THEIR CORRESPONDING REVENUE AFTER WHAT IF

Hi Guys

I'm tying to create a report, where my aim is show the values when the other value changes.

Here is my story, below is my sample data set, The Column, Total Ac Revenue = [AR] * [Comm]* [T Sales],

The AR Can change anytime but we always add on the current AR, For example, The AR for Product1  if increased by 0.05 and become o.96 then the New Total Ac Revenue will be 129 580.8,  >>> [0.96] *[170] *[794]

 

First i created a Table like this

TableProduct = SUMMARIZECOLUMNS('Sample data'[Product], "Product Name", FIRSTNONBLANK('Sample data'[Product],1))
which have have two columns [Product Name] and [Product], i created this table because i  want to see  [AR] change for one product at a time, for example.
 
I Created a What if table named What -if AR with a column name WF AR Changed,  then i created a measure like this, 
What If Value = IF(HASONEVALUE('What-if AR'[WF AR Changed]), VALUES('What-if AR'[WF AR Changed]), 0)
 
Next Step,
 
i CREATED Measure as follow
WIF Actual Revenue =
VAR TotalActualRevenue =SUMX(Sample data,'Sample data'[AR] 'Sample data'[Comm] * 'Sample data'[T Sales] )
VAR Scenario =
SUMX (
'Sample data',
'Sample data'[Comm] * 'Sample data'[T Sales] * ([ AR] + [WF AR Changed])
)
VAR productsSelected =
TREATAS (
VALUES ( 'TableProduct'[Product Name] ),
'Sample data'[Product]
)
RETURN
SUMX (
'Sample data',
IF (
FIRSTNONBLANK( 'Sample data'[Product],1 )
IN productsSelected
&& ISFILTERED( TableProduct[Product Name] ),
Scenario ,
[Sum of Actual Revenue]
)
)
 

This measure return the Scenario Var or TotalActualRevenue depending on whather a product Name on Product Name filter   is selected on not.

 

WHAT I WANT IS TO HAVE TWO FILTERS(Filter by  'Sample data'[Product] and TableProduct[Product Name]) in such a way that when i select product1, product2, and more,  from Sample data[ Product] as filter, then the result be something like

 

Total AC Revenue After what is =  WIF Actual Revenue for product1 + WIF Actual Revenue for product2 +......... ect

 

Can anyone help me please

 

Here is the Sample Data

 

Sample DataSample Data

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

You may check if the following post helps.

https://community.powerbi.com/t5/Desktop/Sum-of-values-in-a-measure-with-divide-measure/m-p/296768#M130947

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-chuncz-msft  Still there is no solution, i'm still trying

Anonymous
Not applicable

Any idea please guys

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.