Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I need a calcualted column that I can use as a slicer to eahter only schow revenue for completed months ore to schow all the revenue.
I have following tables:
FactRevenue: ProjectID| Date| ActualRevenue|ActualProduction
Calendar: Date|Month|.....
Several Dimensions
The calculated column should check for ech projectID if there is a value ind the revenue AND in the production column for a given Date. If there is a value for both Production and Revneu in for a Project at the given date , the column should return "completed", otherwise it should return "incomplete"
Solved! Go to Solution.
Hi @erikmi ,
Please try this :
Column =
IF('FactRevenue'[ActualProduction]<> BLANK() &&'FactRevenue'[ActualRevenue] <> BLANK(),"completed","incompleted")
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I think your solution works the way I need it to, only problem is I need it to work as a Slicer, so it needs to be a calculated column.
Hi @erikmi ,
Please try this :
Column =
IF('FactRevenue'[ActualProduction]<> BLANK() &&'FactRevenue'[ActualRevenue] <> BLANK(),"completed","incompleted")
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-tangjie-msft
Looks good. Thank you!
Now I need to add a condition that checks if there is data for every Porject, menaing does every project exist in specific month
Hi @erikmi ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create two measures.
Measure =
var _a =SELECTEDVALUE('CALENDAR'[Date])
return
IF(MAX('FactRevenue'[Date])=_a && MAX('FactRevenue'[ActualProduction]) <> BLANK() && MAX('FactRevenue'[ActualRevenue]) <> BLANK(),"completed","incompleted")
Measure 2 = var _a =SELECTEDVALUE('CALENDAR'[Date])
var _b =CALCULATE(MAX('FactRevenue'[Date]),FILTER('FactRevenue','FactRevenue'[Date]))
return
IF(_b=_a ,1,0)
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
144 | |
73 | |
63 | |
52 | |
51 |
User | Count |
---|---|
208 | |
91 | |
62 | |
59 | |
56 |