Reply
Highlighted
Frequent Visitor
Posts: 7
Registered: ‎08-29-2018
Accepted Solution

Dyanamic Dimension from measure in power bi

if I have a three Table
1. Dim_Customer : joiningDate, LeavingDate, State, District, Cust_Type, CustID, CustomerName
2. Dim_Date : All Possible Column like Date, Year, Month, Quarter etc..
3. Fact_Sales : CustID, InvoiceDate, SalesAmt

need soluation like :
when i select 3 months from slicer then i need to create column :  (Fact_Sales[SalesAmt]/(Number_of_Month Selected)) and create bucket like 0-100, 100-200, 200-500 etc. Group by with CustomerName/CustID and Customer count in bucket which we have created.
 
Need to show in Matrix
Row = State, City 
Column = Bucket
Value = Distinct Count of CustID
 
Dyanamic Dimension
 
Please Find sample
Please Find Input output Detail of my Issue "Dyanamic Dimension from measure in Power BI "
https://www.dropbox.com/s/n8hrbv6sncgnquk/Copy%20of%20Issue%20Dynamic%20dimension.xls?dl=0

Accepted Solutions
Moderator
Posts: 9,401
Registered: ‎03-06-2016

Re: Dyanamic Dimension from measure in power bi

Hi @Vikram1,

 

You can create a new table like below: 

 

q3.PNG

 

Then create a measure below: 

Measure = var t=SUMMARIZE('InPutData','InPutData'[State],InPutData[City],'InPutData'[CustID],"c1",DIVIDE(SUM('InPutData'[SalesQty]),DISTINCTCOUNT('InPutData'[InvoiceMonth])))
return
COUNTX(FILTER(t,[c1]>=MAX('Table1'[Start])&&[c1]<MAX('Table1'[End])),[CustID])

 

q4.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Attachment

All Replies
Moderator
Posts: 9,401
Registered: ‎03-06-2016

Re: Dyanamic Dimension from measure in power bi

Hi @Vikram1,

 

You can create a new table like below: 

 

q3.PNG

 

Then create a measure below: 

Measure = var t=SUMMARIZE('InPutData','InPutData'[State],InPutData[City],'InPutData'[CustID],"c1",DIVIDE(SUM('InPutData'[SalesQty]),DISTINCTCOUNT('InPutData'[InvoiceMonth])))
return
COUNTX(FILTER(t,[c1]>=MAX('Table1'[Start])&&[c1]<MAX('Table1'[End])),[CustID])

 

q4.PNG

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Attachment