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
carlosam
Frequent Visitor

measure for fuel consumption, two sources amount of liters, amount of kilometers

I have to make a measure for fuel consumption, two sources amount of liters, amount of kilometers for each car; result: one column with two types of readings | l/km | km/l | my issue come with when filtered on slicer ( type of car) … I done with two different column | l/km | km/l |

Thanks

7 REPLIES 7
amitchandak
Super User
Super User

@carlosam , Can you share sample data and sample output in table format?

Please your comments:

_kpi_Rendimientos RO_TR v04 =
VAR _Litros = SUM ( Integral_Mensual_Rend_Costo_stg[Combustible (lts)])
VAR _Recorridos = SUM (Integral_Mensual_Rend_Costo_stg[Total Horas/KM por periodo])
VAR _slicer = IF ( SELECTEDVALUE( Nombre_Comun_tbl[Unit]) = "k", 1, 0)
VAR _kmh = DIVIDE( _Recorridos, _Litros)
VAR _lth = DIVIDE( _Litros, _Recorridos)
RETURN
IF ( _slicer = 1, _kmh, _lth)

Hi @carlosam ,

 

Is your issue solved now?If not,could you pls check my last reply?

 

Best Regards,
Kelly

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

Hi  @carlosam ,

 

I have checked your request,your expression seems no problem,what is your expected output?

 

Best Regards,
Kelly

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

My friend, with this info can you suggest solution.

DateKmliterCar
1-Aug3540A
1-Aug 20B
3-Aug404B
3-Aug 10A
4-Aug395B
5-Aug5255A

Good mornig, thank you sr

carlosam_0-1629394132497.png

Thanks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.